projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b35a7b
)
ASoC: samsung: Add NULL check in i2s.c
author
Sachin Kamat
<
[email protected]
>
Fri, 24 Jan 2014 10:53:22 +0000
(16:23 +0530)
committer
Mark Brown
<
[email protected]
>
Fri, 24 Jan 2014 13:18:03 +0000
(13:18 +0000)
'res' could be NULL from one of the operations above (line 1243). Thus
check 'res' for NULL before releasing the region to avoid null pointer
dereference.
Signed-off-by: Sachin Kamat <
[email protected]
>
Signed-off-by: Mark Brown <
[email protected]
>
sound/soc/samsung/i2s.c
patch
|
blob
|
history
diff --git
a/sound/soc/samsung/i2s.c
b/sound/soc/samsung/i2s.c
index 92f64363427d44b741f2293fa84982c748a72d82..a9da24f34834e090df988f41c0303683f373a506 100644
(file)
--- a/
sound/soc/samsung/i2s.c
+++ b/
sound/soc/samsung/i2s.c
@@
-1268,7
+1268,8
@@
static int samsung_i2s_probe(struct platform_device *pdev)
return 0;
err:
- release_mem_region(regs_base, resource_size(res));
+ if (res)
+ release_mem_region(regs_base, resource_size(res));
return ret;
}