From patchwork Tue Nov 15 05:39:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiapeng Chong X-Patchwork-Id: 13043249 X-Patchwork-Delegate: jikos@jikos.cz 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 6657EC433FE for ; Tue, 15 Nov 2022 05:39:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231982AbiKOFjx (ORCPT ); Tue, 15 Nov 2022 00:39:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229664AbiKOFjp (ORCPT ); Tue, 15 Nov 2022 00:39:45 -0500 Received: from out199-7.us.a.mail.aliyun.com (out199-7.us.a.mail.aliyun.com [47.90.199.7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 134C76463; Mon, 14 Nov 2022 21:39:43 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VUs-Rax_1668490775; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VUs-Rax_1668490775) by smtp.aliyun-inc.com; Tue, 15 Nov 2022 13:39:39 +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: Tue, 15 Nov 2022 13:39:20 +0800 Message-Id: <20221115053920.65318-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@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=3073 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/hid/hid-playstation.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/hid/hid-playstation.c b/drivers/hid/hid-playstation.c index bae3e712a562..a4106f760d1f 100644 --- a/drivers/hid/hid-playstation.c +++ b/drivers/hid/hid-playstation.c @@ -1763,8 +1763,6 @@ 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 { break; }