From nobody Tue Sep 16 04:28:18 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C335C53210 for ; Fri, 6 Jan 2023 02:47:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230088AbjAFCr4 (ORCPT ); Thu, 5 Jan 2023 21:47:56 -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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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=3D3641 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 du= alshock4 *ds4) ret =3D -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 =3D kzalloc(DS4_FEATURE_REPORT_CALIBRATION_BT_SIZE, GFP_KERNEL); --=20 2.20.1.7.g153144c