Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4592362pxj; Wed, 12 May 2021 08:51:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyoI3eOJDml9GeZ3wZIk30pkWhdrANjwgT2wN7nfJfomsmcBYvjiub3vK4agUSpWNgmmrXS X-Received: by 2002:aa7:c34b:: with SMTP id j11mr45552693edr.188.1620834691209; Wed, 12 May 2021 08:51:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620834691; cv=none; d=google.com; s=arc-20160816; b=NkRtgThLdiTjovkcve5pEO3AOJsZzNYVmeQ+45aynE0zQN4uXchXrvxn4kGoA9CAM6 wpS9UUBwNwopg54KjMU5El+eGxdmeU6FzozuuuaU1pkDvlJk5ZPpg4vS5xmNE4Xa+orS U8iKIWTdp5QbvMOMfyJB1+L6OthWLEyHjUtC4mvGnnIwbulWim8bHkPWx8X0CRejG28C srBDmwgN+a/Gsp0Q0+sRuZp4sO67YY691AivACRkGahTO+0UbkVaNp/RvGhUITLyfMP0 GJ95rW0QLkVZXi6X12+kNrt87q6cNUqLZgPDWcN0KXm5ZnELbxzVc8fE2BSMPF6Lauhk PVSQ== 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=ZsFZPwLaS0K9HgXzofhaKFxmM3YuIxyReYk0wewmr48VyGiTvKCnLl2hqCYB4iVoIO Z9LeWoVF8PoajyeY0gCN1H+xNeOtzPA6ZCkfHI90P0xLW0hNDhSQVZb89bziu1pvcWNH TanVOVQtqfqei2foVup3FVZlrp5Zq5N1qHT1VLVTze4leWnS+BhZtgNHY6d3As5ScEGp JaReWelkaj18v60hwYJxxE+SQBk6mVBH1uw1MzcQ/lCcAoMzxkkwisjn111YMffehBCu K9XBdyE3o7JFCte//53YNhacsTCIqdTrnexzODnhZy5vZOoYxb95F3IFIQLs6dhDsmzG +cEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qOeAQm3V; 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 g20si277562ejz.520.2021.05.12.08.51.05; Wed, 12 May 2021 08:51:31 -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=qOeAQm3V; 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 S237603AbhELPu7 (ORCPT + 99 others); Wed, 12 May 2021 11:50:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:40502 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234787AbhELPZe (ORCPT ); Wed, 12 May 2021 11:25:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2989E619CD; Wed, 12 May 2021 15:10:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832234; bh=Cv6LI9wlQSoSUVWhBCyuz4fJ+z81h80e01Lbp8ns4cM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qOeAQm3Vwxkym1PFomrqbrK49GKRjSRb0QNuH+qvXvkbLqkxrAk+HL9hYtMBLSiAS dAzm5e0YawHRWmefE/s+mY0oqLphv3r0ap18klDlkQVxEjvDrx7ugX7ZSmbI9I1cOH IIuv8TIftZRsb8YBvv+JS5a+A0V/c1yrUkbZo+go= 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 5.10 197/530] USB: gadget: udc: fix wrong pointer passed to IS_ERR() and PTR_ERR() Date: Wed, 12 May 2021 16:45:07 +0200 Message-Id: <20210512144826.310772298@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@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