mmc: card: Fix NULL pointer dereference in mmc_blk_ioctl_rpmb_cmd()
In mmc_blk_ioctl_rpmb_cmd(), if user data copy fails, the card variable is dereferenced without NULL pointer check. Adding NULL pointer check in this condition. Change-Id: If3fd2175946cccaf838768d45de72bc2f5c32f6b Signed-off-by: Siba Prasad <sibap@codeaurora.org>
This commit is contained in:
parent
560d31410c
commit
dde9e2de48
1 changed files with 1 additions and 1 deletions
|
@ -1173,7 +1173,7 @@ idata_free:
|
||||||
|
|
||||||
cmd_done:
|
cmd_done:
|
||||||
mmc_blk_put(md);
|
mmc_blk_put(md);
|
||||||
if (card->cmdq_init)
|
if (card && card->cmdq_init)
|
||||||
wake_up(&card->host->cmdq_ctx.wait);
|
wake_up(&card->host->cmdq_ctx.wait);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue