Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp2114102lkv; Thu, 20 May 2021 03:44:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxc1DCuUkFwK2dcnKpLOp12tdjzbJLg0EnyuhQPUPLnMc1ef0Gvxe3RNGciPHhu5g/WSsXh X-Received: by 2002:a05:6e02:ee1:: with SMTP id j1mr4362810ilk.105.1621507470652; Thu, 20 May 2021 03:44:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621507470; cv=none; d=google.com; s=arc-20160816; b=nCghS9gp2Bfsc7MFpEYrqBmvCmLVE99JZNncCdJP+E2XLFj/6pBL1bxwdrc5GUNWsC ifOdVlMb8nfnTFOR2CmcoKHm9VvsuYXOcMPduWQ445vOoxOCuj+bllerrWQRmeW0PipP 3Ss1J1Tm+y19wYMi85HRBI34COtK8kdqXXdmiI0inKGSxl9tKYk4yd2t8bqIwuJNwhhs lmEM9bYSREv8nJKBp0CPPtNzzXIjX7HDmEcgECzzgTvwdwgCDnq/dkzDQ4vGc9yiU4Mc OreQDLxu3Ozbg2XXBmhwSDymtVY4WaFMLsHieVNhfSY1FM6uLyXIRiRdeKq87gpmL40p 9AZg== 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=5z5N45Osrm43o5PKZ82ECjWcVJk2+p7pMnoOY44YTdw=; b=HkSXjdZ8PMM6naXDiF3j7E91hOPiegDF/w0NleMNhS3kds5xrrrepqE7UudStoONzT YosYWDFos+nAijaWAObclvevpCuA7PDzzPz07Pl662LOgbwBEKvTi+uDodXgzBy7lt/2 Bi6gHhm9rqI64BWmypp7YlYIWLB/qzH3Iu3+sF72ZHrBsPEawAf8XeCqift00CEy4kZD krA2qmioCMYUdWhWhXXTKvp0GEOxia5CzTFfNbk+kSglRejyKaUXHlhn4+QKOTTdCK6s N7UX5fMkiQzNZKzqHhvIbp9NHiIWO+Q0UROA4SnsshRGF6ZVT+/lUVH05RDApH3+ZCtU kIYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MS4vbZUg; 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 j8si2084520ioo.10.2021.05.20.03.44.15; Thu, 20 May 2021 03:44: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=@linuxfoundation.org header.s=korg header.b=MS4vbZUg; 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 S236078AbhETKnY (ORCPT + 99 others); Thu, 20 May 2021 06:43:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:54246 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236113AbhETK2V (ORCPT ); Thu, 20 May 2021 06:28:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B408061C2F; Thu, 20 May 2021 09:50:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621504255; bh=bLWm8hy44V8UpnLnkmIfeoX9moIiwg7OlwNSNKDjnRc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MS4vbZUg4ps5wNGCdveoGe4mQU2+RuEWYmWbr/uHSRxgZaQsoqGuOgV7BiSFaYr1u SmJKTg8o7FZKvbkgpjbh0iA+EArODkDMxd5Bp13i2GUd5NykxKOloeIsKAQv2HP8Xu CqlMnvgdcCzJ7bJedbit+YyjSXoKUQpzCbU8HCbw= 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.14 161/323] USB: gadget: udc: fix wrong pointer passed to IS_ERR() and PTR_ERR() Date: Thu, 20 May 2021 11:20:53 +0200 Message-Id: <20210520092125.623965079@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092120.115153432@linuxfoundation.org> References: <20210520092120.115153432@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 e8a5fdaee37d..204f7acf89a4 100644 --- a/drivers/usb/gadget/udc/snps_udc_plat.c +++ b/drivers/usb/gadget/udc/snps_udc_plat.c @@ -122,8 +122,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