Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp1609880lkv; Wed, 19 May 2021 14:01:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3GaWOhYAQ77+YDumovs1P8x1tKS88Vg16bAmnDisz1YU7JSz2KqxSkVZMQOd8ZC1VAYAC X-Received: by 2002:a92:cd0c:: with SMTP id z12mr1126717iln.79.1621458062881; Wed, 19 May 2021 14:01:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621458062; cv=none; d=google.com; s=arc-20160816; b=ipC36YPFib0B6sDXI1bCzXNDzYBT5E/S3hT2/8uYFH26nbxtOzklbrUomLj1nczHTV 3Pnqrvm1ji0BS9jW6VgBHtDNTevPaxiZpLWplRXY9zHrrcoLFxKQ4fwYBt/ECJhgnSnx 0p84002lbAXcljLrdyrBWKTMndlkcip/Oqp2On4hjqDyNPA46Wegs2CyZCGE0lhe6ktU p7CrZ3lutm8JXnhwK2T5Vv+3JJGQ6Th/D320xC5dhVSgOGIX877X1V66L66gADA4ga53 QrGxKu7EHzAd0h6Tcs1Q6V0na8agHg8vI7k6iYwR12YSOUDxPl1sKL+J6vU/4HcJeWyk BJTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=9DNZlrAc3XnBQshZoKRJnJDlGPAGigdQrKtAJ25RdM0=; b=uns6SJtW37YrCiSFtu4cVhQcTbezgKDpqQ857PEQ5EUz/INkZSJwQl4m1srdUjolTn KbZVuH0W0A7fg9GMshBF/PPZolTFdoH4CJh1NLyAIs4KXPnnCrqHIX5pVjWgHysFMBTV dFfRcCOBv07aDiB9QgHSmSiMEhsAsPNb/yAOZMaMX54eEdpqLLtVxQPzg4cUbmjMWvde DSTeu7nwycYunM9wdmZM+YWxeYc/0Omii0uZlB3kfNmWsgGCsvWVnenTh2VtosbPXiIk 19HGOcstnKza7uMjUaCUvHWovz0MHvMo0Ji1hI5D9BO6JIarA7/7dWuUS0wBG2ODxB61 tNlA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f12si460913jas.31.2021.05.19.14.00.49; Wed, 19 May 2021 14:01:02 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347737AbhERJ23 (ORCPT + 99 others); Tue, 18 May 2021 05:28:29 -0400 Received: from cmccmta1.chinamobile.com ([221.176.66.79]:43684 "EHLO cmccmta1.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240100AbhERJ21 (ORCPT ); Tue, 18 May 2021 05:28:27 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.15]) by rmmx-syy-dmz-app01-12001 (RichMail) with SMTP id 2ee160a3885f1a8-8c1f2; Tue, 18 May 2021 17:26:56 +0800 (CST) X-RM-TRANSID: 2ee160a3885f1a8-8c1f2 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from [192.168.21.77] (unknown[10.42.68.12]) by rmsmtp-syy-appsvr08-12008 (RichMail) with SMTP id 2ee860a3885e647-b4121; Tue, 18 May 2021 17:26:55 +0800 (CST) X-RM-TRANSID: 2ee860a3885e647-b4121 Subject: Re: [PATCH] staging: iio: cdc: ad7746: Fix unnecessary check andassignment in ad7746_probe() To: Dan Carpenter Cc: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org, knaack.h@gmx.de, pmeerw@pmeerw.net, gregkh@linuxfoundation.org, linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org References: <20210517150006.8436-1-tangbin@cmss.chinamobile.com> <20210518075254.GN1955@kadam> From: tangbin Message-ID: Date: Tue, 18 May 2021 17:27:07 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20210518075254.GN1955@kadam> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dan: On 2021/5/18 15:52, Dan Carpenter wrote: > On Mon, May 17, 2021 at 11:00:06PM +0800, Tang Bin wrote: >> @@ -730,11 +730,7 @@ static int ad7746_probe(struct i2c_client *client, >> if (ret < 0) >> return ret; >> >> - ret = devm_iio_device_register(indio_dev->dev.parent, indio_dev); >> - if (ret) >> - return ret; >> - >> - return 0; >> + return devm_iio_device_register(indio_dev->dev.parent, indio_dev); >> } > This sort of thing is done deliberately as a style choice... I probably > wouldn't have written it that way myself, but there really isn't a > downside to leaving it as-is. > > The unused "int ret = 0;" just introduces a static checker warning about > unused assignments and disables the static checker warning for > uninitialized variables so we want to remove that. > Got it, I will send this patch for you. Thanks Tang Bin