From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D9484C4321E for ; Sun, 4 Dec 2022 18:53:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EjHo9KnZHccyh33GQheELnIFm7n6fxPlG2cMnV8Tqlk=; b=WN3HMIHfRc5mQE 67imkkuIuRjCT1ygsOc2lTfZ6U7ML8xsZsLn5JHvD+sQpMiSOjwjeDfG7zAMVlQ1xBSiFCaR6Zaic eynWEOjBwYpwEwxz3vseLbKzcYioX2EpJbtiG20TiTY1S29d2OdrCZNJtGD4PHSynoRtTkKdOKMS8 9JIRDXN5MC4K6cuaOGVIbcNbG5fj31Him0tKUhDb4rAyGUVMA+zXk1U05RIn437qaUwuAAZ2EQkMC 98MMWAX6DOLqf4herwLW+qVt4hv3OQDsXhXgenu5NF8bFBvOflV/gcmTyeWkShL7teV6pwroR7h9n 7QjWjcGmXztgi5H9XLWA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p1u68-00APbL-TH; Sun, 04 Dec 2022 18:52:21 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p1ptz-008l3l-D6 for linux-arm-kernel@lists.infradead.org; Sun, 04 Dec 2022 14:23:32 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A9610B80A3A; Sun, 4 Dec 2022 14:23:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE9EBC433D6; Sun, 4 Dec 2022 14:23:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670163808; bh=0jPUnNObV3bkM2t/29uwKFNurRLeu5QoW7vFZFxlKpA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NOajA0zJ41WVM6sdybnbEvWqDT5dhMEmKpL/JL5eG+qWGfyx377FzXvS7sCMmvwtg uzu86D5+Fg4bBJrUPu+lfCAQAhWF69b3hUDcl7kbK/SEcwApbiliwU0M2oJjdKMc0K gMY/b0S1NWgP9KSJeYIsvGPtpb3z7pq37jewfM0xYjgJyPqyKbv8+xqB3tIu5RLPA1 bXTt58dbX8Jx/xhk9p1UJCYxdPX1VYwCJKO+iMPMlL4NZMDThiShP81KgzBo52+rdD sLFOW4MD0zQSjTTlFYG1OaFgto5AVg3tnSjRQTICkPK7HiCO5doGAAx4qPCH4j7jrD BM7ZPjDMfKLrw== Date: Sun, 4 Dec 2022 14:36:13 +0000 From: Jonathan Cameron To: Michal Simek Cc: Marco Pagani , Anand Ashok Dumbre , Lars-Peter Clausen , Michal Simek , Nathan Chancellor , Nick Desaulniers , Tom Rix , Manish Narani , Jonathan Cameron , , , , Subject: Re: [PATCH] iio: adc: xilinx-ams: fix devm_krealloc() return value check Message-ID: <20221204143613.310ed016@jic23-huawei> In-Reply-To: <7127c7f4-89b3-31f8-cabc-43f955eded64@amd.com> References: <20221125113112.219290-1-marpagan@redhat.com> <7127c7f4-89b3-31f8-cabc-43f955eded64@amd.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221204_062331_627438_49FE3FF2 X-CRM114-Status: GOOD ( 20.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 30 Nov 2022 18:04:26 +0100 Michal Simek wrote: > On 11/25/22 12:31, Marco Pagani wrote: > > CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email. > > > > > > The clang-analyzer reported a warning: "Value stored to 'ret' > > is never read". > > > > Fix the return value check if devm_krealloc() fails to resize > > ams_channels. > > > > Fixes: d5c70627a794 ("iio: adc: Add Xilinx AMS driver") > > Signed-off-by: Marco Pagani > > --- > > drivers/iio/adc/xilinx-ams.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/iio/adc/xilinx-ams.c b/drivers/iio/adc/xilinx-ams.c > > index 5b4bdf3a26bb..a507d2e17079 100644 > > --- a/drivers/iio/adc/xilinx-ams.c > > +++ b/drivers/iio/adc/xilinx-ams.c > > @@ -1329,7 +1329,7 @@ static int ams_parse_firmware(struct iio_dev *indio_dev) > > > > dev_channels = devm_krealloc(dev, ams_channels, dev_size, GFP_KERNEL); > > if (!dev_channels) > > - ret = -ENOMEM; > > + return -ENOMEM; > > > > indio_dev->channels = dev_channels; > > indio_dev->num_channels = num_channels; > > -- > > 2.38.1 > > > > Acked-by: Michal Simek Applied to the fixes-togreg branch of iio.git. Given merge window opening soon it might be a few weeks before this goes upstream. Thanks, Jonathan > > Thanks, > Michal _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel