eeprom: at24: check return value of devfs_create and fix error path
if devfs_create failed because "eeprom0" already exists
of_parse_partitions must not be called, otherwise the already existing
eeprom gets assigned partitions that don't belog there.

Also free dummy clients in the error path and the write protect gpio
only if it is actually valid.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent a20a3cb commit 3982f4ad8a3d755959d36905d1528a6820faadfe
@Uwe Kleine-König Uwe Kleine-König authored on 30 May 2016
Sascha Hauer committed on 31 May 2016
Showing 1 changed file
View
drivers/eeprom/at24.c