From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760901AbcBYRJu (ORCPT ); Thu, 25 Feb 2016 12:09:50 -0500 Received: from mail-lf0-f54.google.com ([209.85.215.54]:36341 "EHLO mail-lf0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752104AbcBYRJt (ORCPT ); Thu, 25 Feb 2016 12:09:49 -0500 Message-ID: <1456420183.23036.40.camel@gmail.com> Subject: Re: [PATCH] spi: lp-8841: return correct error code from probe From: Sergei Ianovich To: Arnd Bergmann , Mark Brown Cc: linux-arm-kernel@lists.infradead.org, Rob Herring , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 25 Feb 2016 20:09:43 +0300 In-Reply-To: <1456400265-3068525-1-git-send-email-arnd@arndb.de> References: <1456400265-3068525-1-git-send-email-arnd@arndb.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.3-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 > Fixes: 7ecbfff6711f ("spi: master driver to enable RTC on ICPDAS LP- > 8841") Tested-by: Sergei Ianovich