public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: David Brownell <david-b@pacbell.net>,
	"linux-kernel" <linux-kernel@vger.kernel.org>,
	"Torgil Svensson" <torgil.svensson@gmail.com>
Subject: [PATCH] spi-gpio: Fix returned error code
Date: Sat, 26 Jul 2008 14:18:32 +0200	[thread overview]
Message-ID: <200807261418.33091.mb@bu3sch.de> (raw)

This fixes the returned error code in case spi_new_device failed.

Reported-by: Torgil Svensson <torgil.svensson@gmail.com>
Signed-off-by: Michael Buesch <mb@bu3sch.de>


Index: linux-next/drivers/spi/spi_gpio.c
===================================================================
--- linux-next.orig/drivers/spi/spi_gpio.c	2008-07-26 14:16:32.000000000 +0200
+++ linux-next/drivers/spi/spi_gpio.c	2008-07-26 14:16:54.000000000 +0200
@@ -167,6 +167,7 @@ static int spi_gpio_probe(struct platfor
 	if (err)
 		goto err_bi_setup;
 	sp->bi.controller_data = sp;
+	err = -ENOMEM;
 	spidev = spi_new_device(master, &sp->bi);
 	if (!spidev)
 		goto err_new_dev;

-- 
Greetings Michael.

                 reply	other threads:[~2008-07-26 12:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200807261418.33091.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=akpm@linux-foundation.org \
    --cc=david-b@pacbell.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torgil.svensson@gmail.com \
    /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