projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a7caca
)
soc: qcom: smem: Avoid NULL pointer exception on remove
author
Stephen Boyd
<sboyd@codeaurora.org>
Fri, 28 Aug 2015 18:18:49 +0000
(11:18 -0700)
committer
Andy Gross
<agross@codeaurora.org>
Wed, 14 Oct 2015 19:51:20 +0000
(14:51 -0500)
Don't set a pointer to NULL and then dereference it in the next
line.
Cc: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Andy Gross <agross@codeaurora.org>
drivers/soc/qcom/smem.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/soc/qcom/smem.c
b/drivers/soc/qcom/smem.c
index 52365188a1c20288a754dc7e1a530e4b25570ac3..f402a606eb7dc8da1abbcf76ac2f8cd342e6146f 100644
(file)
--- a/
drivers/soc/qcom/smem.c
+++ b/
drivers/soc/qcom/smem.c
@@
-730,8
+730,8
@@
static int qcom_smem_probe(struct platform_device *pdev)
static int qcom_smem_remove(struct platform_device *pdev)
{
- __smem = NULL;
hwspin_lock_free(__smem->hwlock);
+ __smem = NULL;
return 0;
}