Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp1729009rwl; Thu, 5 Jan 2023 19:00:33 -0800 (PST) X-Google-Smtp-Source: AMrXdXsXh2+DySG3ku5M7sHViGL7j5wiRmPAL+p+vS6e+uj495ewMDGIapPL83W58b8x/4UbAycn X-Received: by 2002:a05:6a20:bb10:b0:ad:2c7c:9510 with SMTP id fc16-20020a056a20bb1000b000ad2c7c9510mr58879051pzb.19.1672974032836; Thu, 05 Jan 2023 19:00:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672974032; cv=none; d=google.com; s=arc-20160816; b=teCPvGC9FLBplZT5nJ9E56FxNQkayyVwCb6OCgixP0qsjqjfHrB3QnqRYgvU3Gt496 X8PtNQe/Zm5vBtj4xW5ffn7s6oLAJoHwH2rN3wc+LlwtVZXTUPdFuWGd3yj7pk42fNy7 D7ZadIQLOcVJhdzOpVR62Rv9/lFfkS1BoQePZH64weza2GZ0NktzYFKlIsqQKIF7PzFw IRrkzA8qzxA7iFqlQ5VvT8AN6IYzdtHpNk70h1U6ct2d7rQfeUDvWDap6+g+cVccV9Ct VNkwkonqitY4EaALEEv68ivzNegnsU7wzTHuudcewml8BJQdD2os4xHzyxX53JSfHxu9 os0A== 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=b8CwI41YU+BfTG0pYLRvLPp+DPQS6YXSjncJFF0OG/U=; b=nEP6QZ9wejuCU1aVUxGwrPJB7zPWeBUF5Q/YHGJU6isC6Y64AhQIjZzZKqxNLANPh2 LsO1M5g9FnNJoNYvGlk9ja0gE+PErDod9/FJSsb09KnOJXVng61lKCsmdWSP56KbtOwl gRzihpUStSBpDJl17pdPCDEY6AIMEYCV3cKepGsi2xPCmRy1MFB1QVLfELDHHaq8+LnV WQLfIwOyOHtIgY9j/3t02x1Gv91mJ4H6xm7r/gZGcy3XwRZpBT8ZYdSf8xrYItJLQS+I zVavpAV6g9YPDGs1gM3ZfSWODOu+oi5yj+2t6T3UgoHimYApFMUhyE4EAVaA/+m0nHoI EF7A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k190-20020a636fc7000000b0046fb2a57348si65297pgc.84.2023.01.05.19.00.25; Thu, 05 Jan 2023 19:00:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230220AbjAFCrz (ORCPT + 57 others); Thu, 5 Jan 2023 21:47:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjAFCry (ORCPT ); Thu, 5 Jan 2023 21:47:54 -0500 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09E2865AFA; Thu, 5 Jan 2023 18:47:52 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VYxvzEL_1672973261; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VYxvzEL_1672973261) by smtp.aliyun-inc.com; Fri, 06 Jan 2023 10:47:49 +0800 From: Jiapeng Chong To: roderick.colenbrander@sony.com Cc: jikos@kernel.org, benjamin.tissoires@redhat.com, rydberg@bitmath.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] HID: playstation: remove unreachable code Date: Fri, 6 Jan 2023 10:47:39 +0800 Message-Id: <20230106024739.13151-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=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham 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 The function dualshock4_get_calibration_data cannot execute hid_err, delete the invalid code. drivers/hid/hid-playstation.c:1766 dualshock4_get_calibration_data() warn: ignoring unreachable code. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3641 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/hid/hid-playstation.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/hid/hid-playstation.c b/drivers/hid/hid-playstation.c index f399bf0d3c8c..8fef1498c397 100644 --- a/drivers/hid/hid-playstation.c +++ b/drivers/hid/hid-playstation.c @@ -1763,11 +1763,8 @@ static int dualshock4_get_calibration_data(struct dualshock4 *ds4) ret = -EILSEQ; goto err_free; } - hid_err(hdev, "Failed to retrieve DualShock4 calibration info: %d\n", ret); - goto err_free; - } else { + } else break; - } } } else { /* Bluetooth */ buf = kzalloc(DS4_FEATURE_REPORT_CALIBRATION_BT_SIZE, GFP_KERNEL); -- 2.20.1.7.g153144c