soc: qcom: smem: Avoid NULL pointer exception on remove
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>
This commit is contained in:
parent
1a7caca20e
commit
f8c67df71b
1 changed files with 1 additions and 1 deletions
|
@ -730,8 +730,8 @@ static int qcom_smem_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
static int qcom_smem_remove(struct platform_device *pdev)
|
static int qcom_smem_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
__smem = NULL;
|
|
||||||
hwspin_lock_free(__smem->hwlock);
|
hwspin_lock_free(__smem->hwlock);
|
||||||
|
__smem = NULL;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue