From: Andrew Morton <akpm@osdl.org>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: linux-kernel@vger.kernel.org,
David Brownell <dbrownell@users.sourceforge.net>
Subject: Re: [PATCH] spi: check platform_device_register_simple() error
Date: Mon, 27 Nov 2006 16:08:55 -0800 [thread overview]
Message-ID: <20061127160855.297667fa.akpm@osdl.org> (raw)
In-Reply-To: <20061127050915.GH1231@APFDCB5C>
On Mon, 27 Nov 2006 14:09:15 +0900
Akinobu Mita <akinobu.mita@gmail.com> wrote:
> 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;
It'd be nice to at least print some (non-debug) message rather than simply
mysteriously failing.
It'd be nicer if parport_driver.attach() didn't return void. Ho hum.
prev parent reply other threads:[~2006-11-28 0:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-27 5:09 Akinobu Mita
2006-11-27 18:28 ` David Brownell
2006-11-28 0:08 ` Andrew Morton [this message]
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=20061127160855.297667fa.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=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®