Message ID | 20231208021715.32450-1-jiapeng.chong@linux.alibaba.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp5195993vqy; Thu, 7 Dec 2023 18:17:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IHQoA7Y/kCGB0jPX0ZTjfY7WlzVBatgp65Zh4fmb5CZ9ZeeQ4gxjX36oHYs6G6RlTtu5Oee X-Received: by 2002:a92:de0b:0:b0:35d:7812:6fee with SMTP id x11-20020a92de0b000000b0035d78126feemr3934482ilm.16.1702001854714; Thu, 07 Dec 2023 18:17:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702001854; cv=none; d=google.com; s=arc-20160816; b=yjmzzZ+6Ofja/7/XuXPbu5YGwQVwb1yVjxJ0OTcK/Y1Aj5iLgP69jRf29Wzb22lp9H MY3up0hJlnOIhK9610l9RrVRs2laU9GmRj11hotxt9PN9CzoYAqk+PSQCsFcfqDXT7Q0 CLaA79s4iZM9SLxJWC6vZiO2kuC6qKsnPZdtK6lY8VPcFvkesEHd7e7EZcksNRmu2oY7 c1JmB6Bsk7qsygExBoX2WbUWzgrHkcAgRzNstnjO9lEaoniZO+UVBxXy0l44X3iebMGq /4ciyNkoyCN+FSxUsGpF8RQsxaNbJOKbtNfuP9VFsUUfdAcHkm/6nnklEc6bIBg2jGK+ z7ug== 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 :message-id:date:subject:cc:to:from; bh=KPd4p1Ja1/oMSeTt+o4J2g7WuYR7ETLhgzOA3xJxjrI=; fh=hiyq2m8LSgYBc2b0WoQbVYGwqabjNB1a0QfTZCroFqQ=; b=pUR99eGpCp3ENZLxMYzG2pCz0/iOoeV1bCZGu1Ql96GzIE27OInu8wT1z+TU4ukO06 1sIUA4Gjr7s3my8Zjwx8D6zfiPItrH9M3fRuXota+x4NSmkI8pN9lW3SaLb+nLACe369 +LmD2Zv9BNdHOxIllVgFEWhFVL/8s/KEp1Ps1uT6opfRFofACErrWnuDIft/m1NliLVz jayzDtgatf+4sm5b9x1DMHw2aCWhleNQ8NgDjTNp/9s8zg+FXoBSB58VEXaNUcKvcuqD su6NN1VLxAiuub/g04LPl2zryYtDjUCfkZEsIjPTJJ8ZgUcI9s6/s1TN6b6ju6ZcCml6 UC8A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id z1-20020a656101000000b005be1e555473si664074pgu.574.2023.12.07.18.17.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 18:17:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 001768108BE9; Thu, 7 Dec 2023 18:17:28 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230510AbjLHCRT (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Thu, 7 Dec 2023 21:17:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229531AbjLHCRS (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 7 Dec 2023 21:17:18 -0500 Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58E5ED53; Thu, 7 Dec 2023 18:17:24 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R361e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0Vy1Y0Nm_1702001836; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0Vy1Y0Nm_1702001836) by smtp.aliyun-inc.com; Fri, 08 Dec 2023 10:17:22 +0800 From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> To: jic23@kernel.org Cc: lars@metafoo.de, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong <jiapeng.chong@linux.alibaba.com>, Abaci Robot <abaci@linux.alibaba.com> Subject: [PATCH] iio: light: isl76682: remove unreachable code Date: Fri, 8 Dec 2023 10:17:15 +0800 Message-Id: <20231208021715.32450-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 07 Dec 2023 18:17:29 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784678296918338789 X-GMAIL-MSGID: 1784678296918338789 |
Series |
iio: light: isl76682: remove unreachable code
|
|
Commit Message
Jiapeng Chong
Dec. 8, 2023, 2:17 a.m. UTC
The function isl76682_read_raw cannot execute return -EINVAL up to 145
lines, delete the invalid code.
drivers/iio/light/isl76682.c:145 isl76682_read_raw() warn: ignoring unreachable code.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7698
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/iio/light/isl76682.c | 1 -
1 file changed, 1 deletion(-)
Comments
On Fri, 8 Dec 2023 10:17:15 +0800 Jiapeng Chong <jiapeng.chong@linux.alibaba.com> wrote: > The function isl76682_read_raw cannot execute return -EINVAL up to 145 > lines, delete the invalid code. > > drivers/iio/light/isl76682.c:145 isl76682_read_raw() warn: ignoring unreachable code. > > Reported-by: Abaci Robot <abaci@linux.alibaba.com> > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7698 > Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Applied. Thanks, Jonathan > --- > drivers/iio/light/isl76682.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/iio/light/isl76682.c b/drivers/iio/light/isl76682.c > index 0a7c3b09c3c0..cf6ddee44ffc 100644 > --- a/drivers/iio/light/isl76682.c > +++ b/drivers/iio/light/isl76682.c > @@ -142,7 +142,6 @@ static int isl76682_read_raw(struct iio_dev *indio_dev, > default: > return -EINVAL; > } > - return -EINVAL; > case IIO_CHAN_INFO_SCALE: > for (i = 0; i < ARRAY_SIZE(isl76682_range_table); i++) { > if (chip->range != isl76682_range_table[i].range)
diff --git a/drivers/iio/light/isl76682.c b/drivers/iio/light/isl76682.c index 0a7c3b09c3c0..cf6ddee44ffc 100644 --- a/drivers/iio/light/isl76682.c +++ b/drivers/iio/light/isl76682.c @@ -142,7 +142,6 @@ static int isl76682_read_raw(struct iio_dev *indio_dev, default: return -EINVAL; } - return -EINVAL; case IIO_CHAN_INFO_SCALE: for (i = 0; i < ARRAY_SIZE(isl76682_range_table); i++) { if (chip->range != isl76682_range_table[i].range)