From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/3] eeprom: at25: check return value of devfs_create
Date: Mon, 30 May 2016 11:39:51 +0200 [thread overview]
Message-ID: <1464601193-20832-1-git-send-email-u.kleine-koenig@pengutronix.de> (raw)
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
next reply other threads:[~2016-05-30 9:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-30 9:39 Uwe Kleine-König [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1464601193-20832-1-git-send-email-u.kleine-koenig@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox