Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2070541rdb; Thu, 7 Dec 2023 18:17:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IHTh3KjH0vNYAFqs6VMO/fPtqwCslNtKkpp7/Q9/+EbQOgJxnVJchYeFL1QNhRpaRSl1bDz X-Received: by 2002:a05:6a00:3288:b0:6ce:2e2c:e21f with SMTP id ck8-20020a056a00328800b006ce2e2ce21fmr4331970pfb.32.1702001858577; Thu, 07 Dec 2023 18:17:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702001858; cv=none; d=google.com; s=arc-20160816; b=s5NNI715hpQ4yw6+qri1yhxkv+n8CDC5DdZA6yON1k/vPrnTChiF27//GYDse23doh BSwrVy+Ln2d4j3UDjO1Lpo7jJx5GcqhuASMtgQLy1vhwiAwNDwPFQbqvnFQv0dHtuGmR ewnHOlmynel/31GVC0h4360ZXMwVrVtnW9ET/5IhACNCxiHP8lUiLy5KByt0OMlkSN56 bG1pE2HfRuoh22HYxTix8JTd18R177wv2pjuTopJzdjIj0jPpcNkVacJ72X98l6tjpU9 mIwnSUDyxe577X+moGJD4xAPKdtCO3WGI+BsS35oKbdTZro3MLCmVkCzaI+dFIhOvKvk TfMA== 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 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id y186-20020a6364c3000000b005c6818b5a24si669861pgb.245.2023.12.07.18.17.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 18:17:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 AE318811ADD0; Thu, 7 Dec 2023 18:17:35 -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 + 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 ); 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 To: jic23@kernel.org Cc: lars@metafoo.de, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot 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: 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:35 -0800 (PST) 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 Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7698 Signed-off-by: Jiapeng Chong --- 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) -- 2.20.1.7.g153144c