mmc: card: Avoid null pointer dereference
authorPhilippe De Swert <philippedeswert@gmail.com>
Wed, 11 Apr 2012 20:31:45 +0000 (23:31 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 7 Jun 2015 23:12:03 +0000 (02:12 +0300)
commit32cfa401acbf38374733503fb1a8548327a726dc
tree83c9feecdf349c771e205cd6cddae60e17d7bbc5
parent75f9445e156987847774ddb25a040ef4bddc03fb
mmc: card: Avoid null pointer dereference

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>
drivers/mmc/card/block.c