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 9af0ac8 commit 09c6802d1578e28b85f24c48f38419ab5c347b47
@Zahari Doychev Zahari Doychev authored on 8 Jul 2014
Sascha Hauer committed on 15 Jul 2014
Showing 1 changed file
View
drivers/mtd/partition.c