9
0
Fork 0

eeprom: at25: check return value of devfs_create

Also only emit the message that the device was probed when it
actually was.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Uwe Kleine-König 2016-05-30 11:39:51 +02:00 committed by Sascha Hauer
parent 24fcf5fcee
commit a20a3cb4cd
1 changed files with 4 additions and 1 deletions

View File

@ -354,8 +354,11 @@ static int at25_probe(struct device_d *dev)
goto fail;
}
err = devfs_create(&at25->cdev);
if (err)
goto fail;
dev_dbg(dev, "%s probed\n", at25->cdev.name);
devfs_create(&at25->cdev);
of_parse_partitions(&at25->cdev, dev->device_node);
return 0;