Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1963567ybk; Thu, 21 May 2020 21:14:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHvuVaRiI//jWjfAb/xW6K2Z89grwt1SfMAXOW5ggWh7pmoXsOmtKmGHwMMTkG+0tNm/iG X-Received: by 2002:a05:6402:3076:: with SMTP id bs22mr1549355edb.161.1590120898447; Thu, 21 May 2020 21:14:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590120898; cv=none; d=google.com; s=arc-20160816; b=bSsfieMblqO+4TORUICFApb7j2CnW2SuByQaS6XAtnFKqK5a+Gclm2oJJGQQv5iv9a cVqERSAZLpzhdMEVPv1bK2AwjSMTC8PjPKb/5Ps/0y4KTmQm8c9Zvo3Eyw24I0tRQXpO xuntBVRxzGHmVXXCeNyXd8kMReZ1zohixvHdVGlHTHuwLqXySUSnAZq9GaEoFZw8o5RA CnIhNZqIzq92Cu6zpjvOqBJJiht5OOXFmw4Z2Xya7fHDYPxIaXnqLlwQBZCq1TGVOvYg PscgIu99TasNufWLKqWfu7LPgQXUyT9BzKx52sqTY2+55N/a3F0VHTs1JoMWk/2RQJ3+ xpHQ== 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; bh=S9ViewjxFd4FFYfBFD8PLgTkskW5wZ+U131HAeyN3FQ=; b=h/hIpkviAffOycE5L8H77+S49OqizvnTCP+0sspp5guECQoZ2pbtsvMsXt/xYGYiHL kxyNwqkCNu4w4FbPrR0UNv5QEcaq7i8WpDhH6a4AbAHF1YJ268KBCG+FkAttVgvO8Eg+ WwVBYvQ/VrpJzrOu6aRkFMGco48a2/tliUxzblsTROnKJGhFSX48JdR41fnjM6zWw02P T7BjqWCrbYwyZOjt4smMmmeUBgR0Xfx5bcSsXBYTYTKE6kE9eAcB4gDFJ2FbMWD2/Jmj O6prDBmzXmrWtaauXFc1lEhxDNVhqmp27mesHkNsvTUhq92gYJBMyJtvfnbbfm06GOD4 pcGQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f24si4552284eja.255.2020.05.21.21.14.36; Thu, 21 May 2020 21:14:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726578AbgEVEND (ORCPT + 99 others); Fri, 22 May 2020 00:13:03 -0400 Received: from mail.loongson.cn ([114.242.206.163]:56832 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725859AbgEVENC (ORCPT ); Fri, 22 May 2020 00:13:02 -0400 Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9AxZuolUcdeFrA3AA--.1237S2; Fri, 22 May 2020 12:12:21 +0800 (CST) From: Tiezhu Yang To: Linus Walleij , Bartosz Golaszewski , Ray Jui , Robert Jarzmik Cc: bcm-kernel-feedback-list@broadcom.com, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Xuefeng Li , Tiezhu Yang Subject: [PATCH 1/3] gpio: bcm-kona: Fix return value of bcm_kona_gpio_probe() Date: Fri, 22 May 2020 12:12:18 +0800 Message-Id: <1590120740-22912-1-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: AQAAf9AxZuolUcdeFrA3AA--.1237S2 X-Coremail-Antispam: 1UD129KBjvdXoWruw18Zw1xXFykAr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ernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When call function devm_platform_ioremap_resource(), we should use IS_ERR() to check the return value and return PTR_ERR() if failed. Fixes: 72d8cb715477 ("drivers: gpio: bcm-kona: use devm_platform_ioremap_resource()") Signed-off-by: Tiezhu Yang --- drivers/gpio/gpio-bcm-kona.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c index baee8c3..cf3687a 100644 --- a/drivers/gpio/gpio-bcm-kona.c +++ b/drivers/gpio/gpio-bcm-kona.c @@ -625,7 +625,7 @@ static int bcm_kona_gpio_probe(struct platform_device *pdev) kona_gpio->reg_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(kona_gpio->reg_base)) { - ret = -ENXIO; + ret = PTR_ERR(kona_gpio->reg_base); goto err_irq_domain; } -- 2.1.0