Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp510821imn; Tue, 26 Jul 2022 01:50:28 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tvLNv8DN9C57sFwRR+cCxus/w3tEEPGkRevWpBbxLtpPsggmf5VpDItV5QG1tAEUxi+sqe X-Received: by 2002:a05:6402:538a:b0:43a:298e:bc2b with SMTP id ew10-20020a056402538a00b0043a298ebc2bmr17090571edb.125.1658825428640; Tue, 26 Jul 2022 01:50:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658825428; cv=none; d=google.com; s=arc-20160816; b=bMrdbMVx5bwgx9k3g1g6O9GwnfKpghfKPVGphEwoLv0B3CpfXzwttRvAUqbY9/r212 TTO/vY97OBmtnvlvjpOjvaMG+SwfvgZBJJtsjBZP8/wL41J2qFUiOS02rkwPfdibaxdd 8kp/B56Md8k2BMe7kC5TUBcE3J+/4oJEbPolIOZrHHjLweY14zq+kPiFlJb+8Fx1OsCQ WeQnoaNm5thIGda4KQ4ks0OtRJ4aUK6k5OSi1DEeL7DQmXrq5qHbkvISEmqQrnQRTWR8 9vvV65LidNtCHwf+bxPdXnvwYRzPPKnYRHHoUFhiJhj6030LMDa37+ew2Guu0Ymsw9Ao 8CNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=nFV00hlVHqyy7InlmvPMiAUU0tH2/H7JFw3X14HBAGk=; b=k7cxRbfKs51PsfbRd1g5N8vQ9FjttE53xiHr8TDCJmmVi7ICiJtwWR6SL+gOLXZts2 6WMpX1cEVzJaOnfgxno3z5N6bS8NRA36NNtZDiQmJ3EBEC0bMb07+HnJ5RaOfdxrmbHw TVhaNVnZ592HAHGKhB1oMSaNF9IFnRpXmcijRyKA68T+pnYZigFq1NX+x7dX3PV4+ofj LL2bzPXKC9+14cCSM34pp2jH6NuFIozo2/GlpWh/QrGnRkYWczlKZ5WaINC2O/YovBaQ 2/NZFiJBHJkbeus+iDSQGmSMih+zVBH9skClvs7Z/5Dfo+JwO9kU+Wxizuax9V+HxW57 BKeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=FZIClfp0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h9-20020a05640250c900b0043c0bf20049si4921333edb.498.2022.07.26.01.50.04; Tue, 26 Jul 2022 01:50:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=FZIClfp0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237954AbiGZI2z (ORCPT + 99 others); Tue, 26 Jul 2022 04:28:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238323AbiGZI2u (ORCPT ); Tue, 26 Jul 2022 04:28:50 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58D3030551; Tue, 26 Jul 2022 01:28:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1658824097; bh=3RSP2yx7K3NGv3aWWQj5WbiKUEF0R+QuwyU5XYA0lUQ=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=FZIClfp0A6gDrpjYXvMXdJF1dM4XQ6/hzxaqkzy2/9p2tPkLBXw5zeCbcPigkVy2L 9a5fXGTE+ETaRSWT8xYYmod5nIaSDKVNnrbpXQRiLMVheXMZojrvjhhDwevoBc/nsx q14gcXlyqUzIPczzYcCU8ngPymNsYIQFCn0jPB7Q= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.20.60] ([92.116.186.181]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mirng-1nbQvt1lBs-00ey03; Tue, 26 Jul 2022 10:28:17 +0200 Message-ID: <70afefa0-2f18-c8c0-33cd-f6abd4010535@gmx.de> Date: Tue, 26 Jul 2022 10:27:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] parisc: check the return value of ioremap() in lba_driver_probe() Content-Language: en-US To: williamsukatube@163.com, James.Bottomley@HansenPartnership.com, linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: William Dean , Hacash Robot References: <20220722025709.2924616-1-williamsukatube@163.com> From: Helge Deller In-Reply-To: <20220722025709.2924616-1-williamsukatube@163.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:u3lbQyxSlwgZR4uGgGbLerNKFvAO9zBJMtW2I/xOystHTZU2Dq9 A1RpqVXYlLWi6Nr2yYM6ypc8dJ+s5newIk6hN6NaSDNpotsmAknZZp1LSyAxCpPOur9FBGI awF3RtMbRyU66qvm/ogPg/f6YOvbH0vuYMKmOqB76ypuvBV/vJ0+JcqNCfGaZxStcVcRW1Z eJZbWpYP4sriFM/Gx5lmg== X-UI-Out-Filterresults: notjunk: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GcKWL/xz2gH IfdrwKdT57KK7c2UZZznP6eevPnSljgEcXd+u5hx1UaJkOfRowcgO0xaL5u3PEut9eTdTtWyF X1lAqZ4rOUbSyoS8ag2HqHXnC7uN75nsTaxeOHUJIM024B9p2I0b8yfbw== X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/22/22 04:57, williamsukatube@163.com wrote: > From: William Dean > > The function ioremap() in lba_driver_probe() can fail, so > its return value should be checked. > > Fixes: 4bdc0d676a643 ("remove ioremap_nocache and devm_ioremap_nocache") > Reported-by: Hacash Robot > Signed-off-by: William Dean applied. Thanks! Helge > --- > drivers/parisc/lba_pci.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c > index 732b516c7bf8..afc6e66ddc31 100644 > --- a/drivers/parisc/lba_pci.c > +++ b/drivers/parisc/lba_pci.c > @@ -1476,9 +1476,13 @@ lba_driver_probe(struct parisc_device *dev) > u32 func_class; > void *tmp_obj; > char *version; > - void __iomem *addr =3D ioremap(dev->hpa.start, 4096); > + void __iomem *addr; > int max; > > + addr =3D ioremap(dev->hpa.start, 4096); > + if (addr =3D=3D NULL) > + return -ENOMEM; > + > /* Read HW Rev First */ > func_class =3D READ_REG32(addr + LBA_FCLASS); >