All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Ianovich <ynvich-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
	Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] spi: lp-8841: return correct error code from probe
Date: Thu, 25 Feb 2016 20:09:43 +0300	[thread overview]
Message-ID: <1456420183.23036.40.camel@gmail.com> (raw)
In-Reply-To: <1456400265-3068525-1-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>

On Thu, 2016-02-25 at 12:37 +0100, Arnd Bergmann wrote:
> The spi_lp8841_rtc_probe() function misses an initialization of the
> return code when it fails to get its memory resource, as gcc notices:
> 
> drivers/spi/spi-lp8841-rtc.c: In function 'spi_lp8841_rtc_probe':
> drivers/spi/spi-lp8841-rtc.c:239:9: error: 'ret' may be used
> uninitialized in this function [-Werror=maybe-uninitialized]
> 
> This changes the code to propagate the error from
> devm_ioremap_resource().
> 
> Signed-off-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
> Fixes: 7ecbfff6711f ("spi: master driver to enable RTC on ICPDAS LP-
> 8841")

Tested-by: Sergei Ianovich <ynvich-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: ynvich@gmail.com (Sergei Ianovich)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] spi: lp-8841: return correct error code from probe
Date: Thu, 25 Feb 2016 20:09:43 +0300	[thread overview]
Message-ID: <1456420183.23036.40.camel@gmail.com> (raw)
In-Reply-To: <1456400265-3068525-1-git-send-email-arnd@arndb.de>

On Thu, 2016-02-25 at 12:37 +0100, Arnd Bergmann wrote:
> The spi_lp8841_rtc_probe() function misses an initialization of the
> return code when it fails to get its memory resource, as gcc notices:
> 
> drivers/spi/spi-lp8841-rtc.c: In function 'spi_lp8841_rtc_probe':
> drivers/spi/spi-lp8841-rtc.c:239:9: error: 'ret' may be used
> uninitialized in this function [-Werror=maybe-uninitialized]
> 
> This changes the code to propagate the error from
> devm_ioremap_resource().
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 7ecbfff6711f ("spi: master driver to enable RTC on ICPDAS LP-
> 8841")

Tested-by: Sergei Ianovich <ynvich@gmail.com>

WARNING: multiple messages have this Message-ID (diff)
From: Sergei Ianovich <ynvich@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>, Mark Brown <broonie@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org,
	Rob Herring <robh@kernel.org>,
	linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] spi: lp-8841: return correct error code from probe
Date: Thu, 25 Feb 2016 20:09:43 +0300	[thread overview]
Message-ID: <1456420183.23036.40.camel@gmail.com> (raw)
In-Reply-To: <1456400265-3068525-1-git-send-email-arnd@arndb.de>

On Thu, 2016-02-25 at 12:37 +0100, Arnd Bergmann wrote:
> The spi_lp8841_rtc_probe() function misses an initialization of the
> return code when it fails to get its memory resource, as gcc notices:
> 
> drivers/spi/spi-lp8841-rtc.c: In function 'spi_lp8841_rtc_probe':
> drivers/spi/spi-lp8841-rtc.c:239:9: error: 'ret' may be used
> uninitialized in this function [-Werror=maybe-uninitialized]
> 
> This changes the code to propagate the error from
> devm_ioremap_resource().
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 7ecbfff6711f ("spi: master driver to enable RTC on ICPDAS LP-
> 8841")

Tested-by: Sergei Ianovich <ynvich@gmail.com>

  parent reply	other threads:[~2016-02-25 17:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-25 11:37 [PATCH] spi: lp-8841: return correct error code from probe Arnd Bergmann
2016-02-25 11:37 ` Arnd Bergmann
2016-02-25 11:37 ` Arnd Bergmann
     [not found] ` <1456400265-3068525-1-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>
2016-02-25 17:09   ` Sergei Ianovich [this message]
2016-02-25 17:09     ` Sergei Ianovich
2016-02-25 17:09     ` Sergei Ianovich
2016-02-26  2:47   ` Applied "spi: lp-8841: return correct error code from probe" to the spi tree Mark Brown
2016-02-27 19:32   ` [PATCH] spi: lp-8841: return correct error code from probe Sergei Ianovich
2016-02-27 19:32     ` Sergei Ianovich
2016-02-27 19:32     ` Sergei Ianovich
     [not found]     ` <1456601577.23036.60.camel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-02-28 22:03       ` Arnd Bergmann
2016-02-28 22:03         ` Arnd Bergmann
2016-02-28 22:03         ` Arnd Bergmann

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=1456420183.23036.40.camel@gmail.com \
    --to=ynvich-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.