Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1215501 > unrolled thread
| Started by | Stephen Boyd <sboyd@codeaurora.org> |
|---|---|
| First post | 2015-08-28 20:20 +0200 |
| Last post | 2015-08-29 00:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] soc: qcom: smem: Avoid NULL pointer exception on remove Stephen Boyd <sboyd@codeaurora.org> - 2015-08-28 20:20 +0200
Re: [PATCH] soc: qcom: smem: Avoid NULL pointer exception on remove Bjorn Andersson <bjorn.andersson@sonymobile.com> - 2015-08-29 00:40 +0200
| From | Stephen Boyd <sboyd@codeaurora.org> |
|---|---|
| Date | 2015-08-28 20:20 +0200 |
| Subject | [PATCH] soc: qcom: smem: Avoid NULL pointer exception on remove |
| Message-ID | <q2wpQ-2E1-7@gated-at.bofh.it> |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Bjorn Andersson <bjorn.andersson@sonymobile.com> |
|---|---|
| Date | 2015-08-29 00:40 +0200 |
| Message-ID | <q2Ats-8kk-15@gated-at.bofh.it> |
| In reply to | #1215501 |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web