Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp669747ybg; Mon, 1 Jun 2020 11:14:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwai0QzwuybP8k0m3Bp2Q1FGKKcS2wKPqR2va1aMdsuHTj3N3jWcJRQdYcl5jFqK7Zx+Hk0 X-Received: by 2002:a05:6402:1c87:: with SMTP id cy7mr14817715edb.354.1591035270524; Mon, 01 Jun 2020 11:14:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591035270; cv=none; d=google.com; s=arc-20160816; b=SfSmSFo75xmKPmZRpEzTZTqwrryV/oMdrxLsT/ixFB1/tfm3IPGoisudX4kFpidEg9 8fWyxD6i0rE9JxEKw/xGaSLDbVwejgJFFaLWCyatgg6e4eZsi14dqk51ACaX2I5/ePND Fod3oWrtKAcPq9ndP4vKnuJzeZlkegTteDIIYMIgmseby/PIC5ONQl42xp69hcyRzWCz L7rtHmY+5ExoXHBTVv9bcPzoUCVn57WfPmnKLm1Fd+OcXz03M3rhXydoY1xUghUJTX7/ 1IYf8aDJZB4OZvdXEwXdmUO329N2Q6+OcIci28clg3gZ/TO0SwBezOhsrfHHOAN/ZfuC HhMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QW5H5XZy9LnP9pAJZeF3wA69lv/OFTZ3igiXCc8B508=; b=U+YkzBVNQcztwRubY7Vdb/4vnHx6XDszGCwv/0ejBlwkCfwgqqTFVKhR6ydK/8FJRN FjJNT8IC3KYts+fUGUHNvCK4op/9/Fs9/YQ/D2nDe41hB07bT8GKLSIaOCpCzASQurXi LOvgaP6cthF6oroKNj1jmwz3ra+Ld2K1Dxwh8mhx2elIhKj4E+UMidE2u3e6RTJr4pHk XA4UPXD/uuuYS6vjmaB4THgDWuEAWpHcLPwUiqwa33TKXPyJuR88kvSa/chLahYK9SuW 2EjKMff1yeaKovFeeysKNVqnZJLxLeATBOUhCw9ytmAfvmBLXl3RFaOB0PDypKZm3v7v bPcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=N2ESWlGW; 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 e9si107518edn.18.2020.06.01.11.14.07; Mon, 01 Jun 2020 11:14:30 -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; dkim=pass header.i=@kernel.org header.s=default header.b=N2ESWlGW; 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 S1730846AbgFASJK (ORCPT + 99 others); Mon, 1 Jun 2020 14:09:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:55500 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730099AbgFASJJ (ORCPT ); Mon, 1 Jun 2020 14:09:09 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3184E206E2; Mon, 1 Jun 2020 18:09:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591034948; bh=fbp5eN4Hnuv3+bR/hO5F+wm3gfMFLymjiWDBZD1oZEU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N2ESWlGWhEl3PFf0bWyCp8f618knM9Dse3VG/XP6rAkGdrwG6BuYNCAYKZrjZUS/N qjoIj3IdnAIsy1vQScgpTgK+Hb2dgSJKmRpnKWyU33xZ/cpv/snHQUqf8Ym3Ub74Si Rj9gzDaZOg5DqU/wrhLYMI40/263TbXriy7s/HnQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tiezhu Yang , Bartosz Golaszewski , Sasha Levin Subject: [PATCH 5.4 084/142] gpio: pxa: Fix return value of pxa_gpio_probe() Date: Mon, 1 Jun 2020 19:54:02 +0200 Message-Id: <20200601174046.636051642@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200601174037.904070960@linuxfoundation.org> References: <20200601174037.904070960@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tiezhu Yang [ Upstream commit 558ab2e8155e5f42ca0a6407957cd4173dc166cc ] 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 Signed-off-by: Bartosz Golaszewski Signed-off-by: Sasha Levin --- 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 9888b62f37af..432c487f77b4 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c @@ -663,8 +663,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.25.1