drivers/mtd: fix NULL pointer dereference in partition lock/unlock
Some mtd device does not support lock and unlock functions. Adding this check
avoids crashing when mtd_part_lock/unlock are called for such devices.

Signed-off-by: Zahari Doychev <zahari.doychev@linux.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 3f4e7ad commit 433135c85c521aa9119b8ad1343eb70973c58f21
@Zahari Doychev Zahari Doychev authored on 8 Jul 2014
Sascha Hauer committed on 9 Jul 2014
Showing 1 changed file
View
drivers/mtd/partition.c