[PATCH 1/3] eeprom: at25: check return value of devfs_create

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux