From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
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 <jiapeng.chong@linux.alibaba.com>,
Abaci Robot <abaci@linux.alibaba.com>
Subject: [PATCH] HID: playstation: remove unreachable code
Date: Fri, 6 Jan 2023 10:47:39 +0800 [thread overview]
Message-ID: <20230106024739.13151-1-jiapeng.chong@linux.alibaba.com> (raw)
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 <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
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
next reply other threads:[~2023-01-06 2:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-06 2:47 Jiapeng Chong [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-11-15 5:39 [PATCH] HID: playstation: remove unreachable code Jiapeng Chong
2022-11-15 15:41 ` Roderick Colenbrander
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230106024739.13151-1-jiapeng.chong@linux.alibaba.com \
--to=jiapeng.chong@linux.alibaba.com \
--cc=abaci@linux.alibaba.com \
--cc=benjamin.tissoires@redhat.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=roderick.colenbrander@sony.com \
--cc=rydberg@bitmath.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox