From patchwork Fri Jun 30 16:09:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 106750 Delivered-To: patch@linaro.org Received: by 10.182.135.102 with SMTP id pr6csp6115597obb; Fri, 30 Jun 2017 09:11:42 -0700 (PDT) X-Received: by 10.84.210.106 with SMTP id z97mr25565217plh.6.1498839102875; Fri, 30 Jun 2017 09:11:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498839102; cv=none; d=google.com; s=arc-20160816; b=TCKXmGn2cb9rX8Q+p0aiWQvfHp/UyYaTFK5NfdhrgR7EXl33gSMvnasLaArvlzrbwY wJG5Hk6k+fC78IkkbZnwYFr3macjukegcgI7V1WZWZ+pUeCWabITBWGnDtJ0TXnHGxhn Ukui89qO5mnFiMCp1PzTu9NYPCHslBYbgvSjTlJdU9Cu8z33aQZakuNcwsJ5y+THNJgX 8f4ThRfb7nGs2mlWiVFHmInMPhJhRnsdDNhqNNyMHsOj9N6594CxMU7ZfCPqr832jUAw K09cKHhO17kTLn8Fw6riFWvy2KvB9mUN5Y75sJXLcGVZ05gi/rUsVseIBbLEX80ia8dt XsdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=cHZufDBLHG6nh6Us8tgItcpr6cBn/Pe/Fif802QuNZM=; b=AyaDSevcDhzHNePQPKo17TlrCRtITSYed0nnAMk3T9SbiTXwJqKuqNXpCQjh3XkLBT 3aJToTAbiCqx+Fehi6HvS3U+AibXUCcJfI0vOo9T4Z+RP0WHynwFlVRnl2/VNeP9q6vY LU7QiZB/kj82mDkGOP4DL7syrmh7yTBnu4DreCStmlWAn/HwuKdhXbgUZZO8v/AS2whf 5PJwvuGo2jG5VqCWeXuOu3koo4XUI2Q/WpBQ4kLXYEFWslfBoxgWyf+KKxD4um341qZ0 UWj833yGD0NL2z7JHDIGRiYQGnu7zZ7nwe1yR4zb9Dq1FMb/y1B9mDogmMWDWjNAutmG tV7A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m61si6479134plb.149.2017.06.30.09.11.42; Fri, 30 Jun 2017 09:11:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752532AbdF3QLA (ORCPT + 25 others); Fri, 30 Jun 2017 12:11:00 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:49977 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751613AbdF3QK6 (ORCPT ); Fri, 30 Jun 2017 12:10:58 -0400 Received: from wuerfel.lan ([5.56.224.194]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.129]) with ESMTPA (Nemesis) id 0McAb5-1d7vNN34Lv-00JXH2; Fri, 30 Jun 2017 18:10:10 +0200 From: Arnd Bergmann To: Linus Walleij Cc: Arnd Bergmann , Jacopo Mondi , Geert Uytterhoeven , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] pinctrl: rza1: fix error handling Date: Fri, 30 Jun 2017 18:09:53 +0200 Message-Id: <20170630161009.13762-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:zGs9otbEqoD0He2rXnOYe15PVR8f6wTkvXXrMU18hdf4BISv0N6 3wT6RwAEhNLflsf7M3NUoHp9b2BIUrT6RRuvgQem7wHhp5chwDYtlvyuRMpSzG9i2onPFqP 2qYi5CGakyaZtDtx9avG7UlyTlSFgGfrb0O925PXpApBGGlp0FnOGVd/X9CW0MX87qBBaOG j38WNB64wRLnvXLXcVd8A== X-UI-Out-Filterresults: notjunk:1; V01:K0:ptg8c/NX8KU=:TQB4OorDd+/pSNM3PxnFzV hLo6SaN/fdbGPzu2s5aqH2YYRjkeLMaO5B/GwNiLf5hObNCScC/HJzr6eR993GeJUMWfSF+YG css1jUmop5JAl83NirZj1QLxi/fJfp0J+hZGFGgSUbXhIuZTHJaIwDN+mJJBZHX1dNEm/9A0Z fqG9dOSb/iRs/lCjpgIUapBdjyFnncoJRSd4IYa4+GZdcKgGy0y0FhjqN1j+by+Xh3v+Mb/az 2Fp1JcPdHrdl9r0BPXwZILUipN/CVpvA2GnVFKLzyl3IVchrwgnpywl26Ub1ozFk9870KqII6 mr+J1e9Vn+oprNFLYhnrjXwgEQrdaOFQRfFZZcUKJGCH5z+y65e8/D9jgom25ad7a0b1h0n+0 trtDJ/RJk5KVc35VpcEwgGgtOqKDqgA319QtckZrEJ95eF/MTiHvJ5kc/mfTxAFqKdm78USIk SbVICRsIoDReBgOwKXwyj+Lwpt0c72H80x5zly2r5us7xWo0xJFOisQC3KHUryrrPzSxBgV7T quXPnNoEXSq42YKnKXv9k4A0o58ZqGalXkcKXMtduBNUZwbnQS5LjUDTI6oMZeyYhs9D23Wp8 G7eDT/DwH855+cQTzwhlCdGQHRSfJrN+k4hEFKh+wvM6cLXL8QFgOjZRUAuOZ/0MABg7iv2xz szk5NswZocV0aae4yQwXbOxYd7UUbu9+Hg6Ajcnk5lMinacUr3Wu3wOrAO+QqCaiQauQ= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A compiler warning points out a typo: drivers/pinctrl/pinctrl-rza1.c: In function 'rza1_pinctrl_probe': drivers/pinctrl/pinctrl-rza1.c:1260:5: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized] This changes the condition to the usual check for failure of the previous function call. Fixes: 5a49b644b307 ("pinctrl: Renesas RZ/A1 pin and gpio controller") Signed-off-by: Arnd Bergmann --- drivers/pinctrl/pinctrl-rza1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/drivers/pinctrl/pinctrl-rza1.c b/drivers/pinctrl/pinctrl-rza1.c index 614a043f3038..1d57d4480a02 100644 --- a/drivers/pinctrl/pinctrl-rza1.c +++ b/drivers/pinctrl/pinctrl-rza1.c @@ -1257,7 +1257,7 @@ static int rza1_pinctrl_probe(struct platform_device *pdev) rza1_pctl->dev = &pdev->dev; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (ret) + if (!res) return -ENODEV; rza1_pctl->base = devm_ioremap_resource(&pdev->dev, res);