Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1963441ybk; Thu, 21 May 2020 21:14:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0bUKk2K2Nj1OzwY4bAdF+YjaJY52wHy6gVFHB5QQa959Q+gGdhADz/GfJhjMBArFkLEh9 X-Received: by 2002:a17:907:1199:: with SMTP id uz25mr6915922ejb.24.1590120882627; Thu, 21 May 2020 21:14:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590120882; cv=none; d=google.com; s=arc-20160816; b=BOtnKEvvBtttQPUovgcD7Ez41kwHWw61WhFcuvKvriIk2Qrc1W42LPWX3Z8qWnnAHn mNK00iRNGRwijRCMLe9j2VhoD1zVdm7p7XVNPF31De+VwXxoHATW4xPMCGZH1OJeROya LBN32yaigiOQz4yUV5lmNUSx22yoYK23pHocg/IRfvim4zRQxOuYDisJC1CYWpqUoirP JYi0KpHuAx2QNlYdgbHPGebgqFhJ7aiagbFEgWfOJnCQI72dXZDoM8oL/zi5T9XtutVr DYW8a6q+atOl+FEZ12SYwJgCiXpHBlLNDcY+KD1rL05ZKe34a8M+aZ9rhXqAFukV0dFO qbJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=jY/r8O+wggq273uRWwxvv6GOu/BXsYxPcz6XQCgkZfA=; b=bAGKzZcRElTOFT0yuUK18Dlq0wYmDWqUkbmnt7FZrV8e8bWodxhit23w4ygQZggS+y pY46tYnH9Bz/UzTtOm//x+igVNR8pvY8D9y0jiyAjOq1czEN60SbarViIqmk6hN0g/5H J6J2pTqBLJTAYzCwrnNcjcIWO46e0dUAD29NetGkMUNBAxZa8Iu+r/IX9aCkVxtnxgDa YQcDMETSH9DlkjohGhOllo1zWrYijgoigDvurE56msKNcawpsHaFbc76ekRQjTYkCfSz ja1+wn5fz8QLuh2PgJ2WuaO1oIU2g0/SujaZft4RO5GTupxQE/Oh3XmqnXOQZNZojw1u JycA== 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 bo6si4065288edb.586.2020.05.21.21.14.20; Thu, 21 May 2020 21:14:42 -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 S1726411AbgEVENB (ORCPT + 99 others); Fri, 22 May 2020 00:13:01 -0400 Received: from mail.loongson.cn ([114.242.206.163]:56830 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725928AbgEVENB (ORCPT ); Fri, 22 May 2020 00:13:01 -0400 Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9AxZuolUcdeFrA3AA--.1237S3; Fri, 22 May 2020 12:12:22 +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 2/3] gpio: pxa: Fix return value of pxa_gpio_probe() Date: Fri, 22 May 2020 12:12:19 +0800 Message-Id: <1590120740-22912-2-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1590120740-22912-1-git-send-email-yangtiezhu@loongson.cn> References: <1590120740-22912-1-git-send-email-yangtiezhu@loongson.cn> X-CM-TRANSID: AQAAf9Ax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26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjfU1E_MUUUUU X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ Sender: linux-kernel-owner@vger.kernel.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: 542c25b7a209 ("drivers: gpio: pxa: use devm_platform_ioremap_resource()") Signed-off-by: Tiezhu Yang --- drivers/gpio/gpio-pxa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c index 1361270..0cb6600 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c @@ -660,8 +660,8 @@ static int pxa_gpio_probe(struct platform_device *pdev) pchip->irq1 = irq1; gpio_reg_base = devm_platform_ioremap_resource(pdev, 0); - if (!gpio_reg_base) - return -EINVAL; + if (IS_ERR(gpio_reg_base)) + return PTR_ERR(gpio_reg_base); clk = clk_get(&pdev->dev, NULL); if (IS_ERR(clk)) { -- 2.1.0