summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
75f9445)
After the null check on md the code jumped to cmd_done, which then
will dereference md in mmc_blk_put. This patch avoids the possible
null pointer dereference in that case.
Signed-off-by: Philippe De Swert <philippedeswert@gmail.com>
Reviewed-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
md = mmc_blk_get(bdev->bd_disk);
if (!md) {
err = -EINVAL;
md = mmc_blk_get(bdev->bd_disk);
if (!md) {
err = -EINVAL;
cmd_done:
mmc_blk_put(md);
cmd_done:
mmc_blk_put(md);
kfree(idata->buf);
kfree(idata);
return err;
kfree(idata->buf);
kfree(idata);
return err;