of_partition: devfs_add_partition returns an error pointer
Check for the return value of devfs_add_partition with IS_ERR.
Otherwise we dereference a NULL pointer when devfs_add_partition
fails.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent b8fa109 commit 15fe5e42b2bff3544434e07aff98262507ab04b3
@Sascha Hauer Sascha Hauer authored on 31 Jul 2014
Showing 1 changed file
View
drivers/of/partition.c