* [PATCH] soc: qcom: smem: Avoid NULL pointer exception on remove
@ 2015-08-28 18:18 Stephen Boyd
2015-08-28 19:53 ` Bjorn Andersson
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Boyd @ 2015-08-28 18:18 UTC (permalink / raw)
To: linux-arm-kernel
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>
---
drivers/soc/qcom/smem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c
index 6603201d7fc7..4c347e7c5880 100644
--- a/drivers/soc/qcom/smem.c
+++ b/drivers/soc/qcom/smem.c
@@ -737,8 +737,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;
}
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] soc: qcom: smem: Avoid NULL pointer exception on remove
2015-08-28 18:18 [PATCH] soc: qcom: smem: Avoid NULL pointer exception on remove Stephen Boyd
@ 2015-08-28 19:53 ` Bjorn Andersson
0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Andersson @ 2015-08-28 19:53 UTC (permalink / raw)
To: linux-arm-kernel
On Fri 28 Aug 11:18 PDT 2015, Stephen Boyd wrote:
> Don't set a pointer to NULL and then dereference it in the next
> line.
>
Sorry about that.
Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Regards,
Bjorn
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-28 19:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-28 18:18 [PATCH] soc: qcom: smem: Avoid NULL pointer exception on remove Stephen Boyd
2015-08-28 19:53 ` Bjorn Andersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).