From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: David Brownell <dbrownell@users.sourceforge.net>
Subject: [PATCH] spi: check platform_device_register_simple() error
Date: Mon, 27 Nov 2006 14:09:15 +0900 [thread overview]
Message-ID: <20061127050915.GH1231@APFDCB5C> (raw)
This patch checks the return value of platform_device_register_simple().
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
drivers/spi/spi_butterfly.c | 2 ++
1 file changed, 2 insertions(+)
Index: work-fault-inject/drivers/spi/spi_butterfly.c
===================================================================
--- work-fault-inject.orig/drivers/spi/spi_butterfly.c
+++ work-fault-inject/drivers/spi/spi_butterfly.c
@@ -250,6 +250,8 @@ static void butterfly_attach(struct parp
* setting up a platform device like this is an ugly kluge...
*/
pdev = platform_device_register_simple("butterfly", -1, NULL, 0);
+ if (IS_ERR(pdev))
+ return;
master = spi_alloc_master(&pdev->dev, sizeof *pp);
if (!master) {
next reply other threads:[~2006-11-27 5:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-27 5:09 Akinobu Mita [this message]
2006-11-27 18:28 ` David Brownell
2006-11-28 0:08 ` Andrew Morton
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=20061127050915.GH1231@APFDCB5C \
--to=akinobu.mita@gmail.com \
--cc=dbrownell@users.sourceforge.net \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®