Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2274859pxp; Mon, 21 Mar 2022 15:36:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzU9uixJiKv6rygNtTis1Ts2QOEt6vGqfgE5j6fx95KdFwR/69gNg8RJRwqnNKaTr6GiU+u X-Received: by 2002:a05:6a02:28e:b0:380:3aee:e863 with SMTP id bk14-20020a056a02028e00b003803aeee863mr19602448pgb.556.1647902183120; Mon, 21 Mar 2022 15:36:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647902183; cv=none; d=google.com; s=arc-20160816; b=qD+3nVp7yBsDPE2zDVHFY5OTL40zyhwAWwNyytTw8d/khfTUGuWuCmfmHCyU5W8gGt vrsoceHnZT8fm/4xSJnfo5U71nZESR+pewR+MrDwMLCKao2ZM0K4cZBOjXD3eypYNsef AKEKJ/TT72rlYBQJOWyz/iRzOvumP/mwl34+/W1CNNPgH593RyZEUpv6XA4w3578cc7F /6QpuPrSeQIgFomZjDaQcbbAJQ6OZ2kPXXZZnKmFfS/m+2+t1PjSKuswe7kB9juoXJsY lJ88Q9LVH+GhbuXxDrjq0C+qjxf/g1FM82YwwCm3lNe5nY1AwIAORQ3vpX66uNTdcX7r 2Q5Q== 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 :references:in-reply-to:message-id:cc:to:subject:from:date :dkim-signature; bh=aVrCF/2V/G1E36VXuX6ssaft/908rYw10LtHewuhQpk=; b=L/ZPQZMwFLG+C4jB9Er6akCwfnjY8POerXNtXXu3Z0ropBDa8pfpMqolIAnI9GhUca lUzzrqXea3+CAh2LO0JYzbY2SfrxRyaTxplkF75YqHjFSwPCWD6jokJORCudWU8PuZ4o 03IipelG2GjX3HSysvwDr7LtRlrR/fJHBvShCGrb+gEhShmjYhpjXx1Kvfc3HBkFf1bR juovqH1+apaYN1IGEzio2Xon4Qh1MXGhMoKNtm5oVG38LRniki7dVjC/NtjUoNAnSJwo 9V2lIq9NveiZu79/2Q9IVT0f14jGdo3i051gZEU0TqCePmgWY1WjLjFbeGFD95/nXygx bywA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=HQJDghqR; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id a12-20020a65604c000000b003821d32f04csi13032448pgp.116.2022.03.21.15.36.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 15:36:23 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=HQJDghqR; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D95B33B9764; Mon, 21 Mar 2022 14:49:08 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345560AbiCUJaP (ORCPT + 99 others); Mon, 21 Mar 2022 05:30:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238396AbiCUJaO (ORCPT ); Mon, 21 Mar 2022 05:30:14 -0400 Received: from aposti.net (aposti.net [89.234.176.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1D4411A2D; Mon, 21 Mar 2022 02:28:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1647854925; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aVrCF/2V/G1E36VXuX6ssaft/908rYw10LtHewuhQpk=; b=HQJDghqRuYk7vr/fYw9xIQ6EefAjPgNraYg1zhVIO5ZaS0EjoS3CwCzI8vqadWft6Tu4f8 XhFwafzjwwCOJanoC31t+YmIBOCPjB/fVp+5RZs1qwRs5k/ZO48C5V91eOXaYn/19qT8C2 yHw7CsNWRxGQ3GyMtJJWuPfH8twYQwc= Date: Mon, 21 Mar 2022 09:28:36 +0000 From: Paul Cercueil Subject: Re: [PATCH] iio: dac: ad5592r: Fix the missing return value. To: Jonathan Cameron Cc: Zizhuang Deng , Jonathan.Cameron@huawei.com, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, Paul Cercueil Message-Id: In-Reply-To: <20220320152047.2a04a62e@jic23-huawei> References: <20220310125450.4164164-1-sunsetdzz@gmail.com> <20220320152047.2a04a62e@jic23-huawei> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi, Le dim., mars 20 2022 at 15:20:47 +0000, Jonathan Cameron=20 a =E9crit : > On Thu, 10 Mar 2022 20:54:50 +0800 > Zizhuang Deng wrote: >=20 >> The third call to `fwnode_property_read_u32` did not record >> the return value, resulting in `channel_offstate` possibly >> being assigned the wrong value. >>=20 >> Signed-off-by: Zizhuang Deng > Hi, >=20 > Definitely rather odd looking and I think your conclusion is correct. > +CC Paul for confirmation that this isn't doing something clever.. It's been a while, but I don't think there was anything clever going on=20 here - so the patch is fine. Cheers, -Paul >=20 >> --- >> drivers/iio/dac/ad5592r-base.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >>=20 >> diff --git a/drivers/iio/dac/ad5592r-base.c=20 >> b/drivers/iio/dac/ad5592r-base.c >> index a424b7220b61..4434c1b2a322 100644 >> --- a/drivers/iio/dac/ad5592r-base.c >> +++ b/drivers/iio/dac/ad5592r-base.c >> @@ -522,7 +522,7 @@ static int ad5592r_alloc_channels(struct=20 >> iio_dev *iio_dev) >> if (!ret) >> st->channel_modes[reg] =3D tmp; >>=20 >> - fwnode_property_read_u32(child, "adi,off-state", &tmp); >> + ret =3D fwnode_property_read_u32(child, "adi,off-state", &tmp); >> if (!ret) >> st->channel_offstate[reg] =3D tmp; >> } >=20