mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] eeprom: at25: check return value of devfs_create
@ 2016-05-30  9:39 Uwe Kleine-König
  2016-05-30  9:39 ` [PATCH 2/3] eeprom: at24: check return value of devfs_create and fix error path Uwe Kleine-König
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2016-05-30  9:39 UTC (permalink / raw)
  To: barebox

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>
---
 drivers/eeprom/at25.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/eeprom/at25.c b/drivers/eeprom/at25.c
index 9f054d00b459..f7f8368c4b45 100644
--- a/drivers/eeprom/at25.c
+++ b/drivers/eeprom/at25.c
@@ -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;
 
-- 
2.8.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-31  6:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-30  9:39 [PATCH 1/3] eeprom: at25: check return value of devfs_create Uwe Kleine-König
2016-05-30  9:39 ` [PATCH 2/3] eeprom: at24: check return value of devfs_create and fix error path Uwe Kleine-König
2016-05-30  9:39 ` [PATCH 3/3] eeprom: at24: make device name setup more robust Uwe Kleine-König
2016-05-31  6:58 ` [PATCH 1/3] eeprom: at25: check return value of devfs_create Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox