Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp337609pxj; Thu, 20 May 2021 10:26:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFrjKnR4y3appsvCG6tIPG7MmZ6r2zlCNVHmq7nw0GXnLYjJDyL7chL+UkvPAigy1fGYeS X-Received: by 2002:a92:d844:: with SMTP id h4mr5893503ilq.215.1621531586687; Thu, 20 May 2021 10:26:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621531586; cv=none; d=google.com; s=arc-20160816; b=Je6y1L7FgPbiQd29t19D88N0W1hVIUHBoKPdHPFWu3trvHjhohvOWMWIxMcG4vmwq/ PKgEcvxvRE3kHUm4SP5s3FpyHv5ehf2xEWGYFBeP6FffIaYgfxVNB1XkIC7igwts9mCc R+2/Ge3Ko91ILt4bJCTJ2EL5asX+lGBPHtrRJf+RgbWhGvYuVcZchjwQyHzgpf4oWOjt ZEdbV8VlwCSoQEprpj2Vzs7tyrX0BFF5c4tVF6O/Iy8Z6Yomzk8ey+QgsMlaX7awkcep JK+xKmto0ks8q5nju/KBp0psp52ghHJJQ4mzOz183XXN+BoR4tWHCXtodMO3/8HFNIz2 2dOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Vs4Ld2LFJfQi0CA7csJHYDAqeBQrnQJKOjB33IhEngc=; b=Vwqb90MEUFktT5BcWwOY5bX5yGFnrqYBLX2UNjPQYIpQ3Q6BRr+xzrYbxDH+b2OgcG mYe05urPBYP5IMBq3HBBLsqQe5G5fi2VYZYq0VeqY3QaF9JnS9gd4mbRT4OiIsZhWRRF xQDhC9JhA8tUY8lGVlRtKRC0egpcWP78T9YJ/PdeTH2+T1be45wysIP8ELzOJdZtrsku N0SfQ83Hd3OAPBoglqm3zhXRP66NGMsjYAWf/xS6gFkxtMJuxVhYGMwsTEsF0mh69YhY OYiZ1BxX3IzKAe2Unv/L7Y37pWIn3sbk/sWfTiQK2nf0s0rF5mA/XIEHH0Zda3SV7osl SmiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EelB0mov; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k23si2629224iom.85.2021.05.20.10.26.09; Thu, 20 May 2021 10:26:26 -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=@linuxfoundation.org header.s=korg header.b=EelB0mov; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234181AbhETJ4X (ORCPT + 99 others); Thu, 20 May 2021 05:56:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:54306 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234462AbhETJwq (ORCPT ); Thu, 20 May 2021 05:52:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2AF3D61622; Thu, 20 May 2021 09:36:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621503378; bh=Cv6LI9wlQSoSUVWhBCyuz4fJ+z81h80e01Lbp8ns4cM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EelB0movQf8W2dJzDpOSEDdx7o7oSomCbDNNQ3uu8bZtYcMaNr81cGMw3QY3H5jr1 YBLUI6lTnmXD2NkzzHrlmDU4CpBobgGiIMi00DnKf2ciWmcivSv5QPwdJNZ8QTzal+ hcIIsv9ECx0fNpji8CJDEribpFu0KZ20gUHmo5yE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Yang Yingliang , Sasha Levin Subject: [PATCH 4.19 195/425] USB: gadget: udc: fix wrong pointer passed to IS_ERR() and PTR_ERR() Date: Thu, 20 May 2021 11:19:24 +0200 Message-Id: <20210520092137.828611977@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092131.308959589@linuxfoundation.org> References: <20210520092131.308959589@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yang Yingliang [ Upstream commit 2e3d055bf27d70204cae349335a62a4f9b7c165a ] IS_ERR() and PTR_ERR() use wrong pointer, it should be udc->virt_addr, fix it. Fixes: 1b9f35adb0ff ("usb: gadget: udc: Add Synopsys UDC Platform driver") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210330130159.1051979-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/usb/gadget/udc/snps_udc_plat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/udc/snps_udc_plat.c b/drivers/usb/gadget/udc/snps_udc_plat.c index 32f1d3e90c26..99805d60a7ab 100644 --- a/drivers/usb/gadget/udc/snps_udc_plat.c +++ b/drivers/usb/gadget/udc/snps_udc_plat.c @@ -114,8 +114,8 @@ static int udc_plat_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_MEM, 0); udc->virt_addr = devm_ioremap_resource(dev, res); - if (IS_ERR(udc->regs)) - return PTR_ERR(udc->regs); + if (IS_ERR(udc->virt_addr)) + return PTR_ERR(udc->virt_addr); /* udc csr registers base */ udc->csr = udc->virt_addr + UDC_CSR_ADDR; -- 2.30.2