diff mbox series

[1/5] HID: playstation: fix DualShock4 unreachable calibration code.

Message ID 20230106015910.3031670-2-roderick.colenbrander@sony.com (mailing list archive)
State Mainlined
Commit 5e25a8cdbe93c50f743e2ff0907996c697347864
Delegated to: Jiri Kosina
Headers show
Series HID: playstation: various DS4 and DualSense fixes | expand

Commit Message

Roderick Colenbrander Jan. 6, 2023, 1:59 a.m. UTC
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Reported-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
---
 drivers/hid/hid-playstation.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Jiri Kosina Jan. 18, 2023, 9:11 a.m. UTC | #1
On Thu, 5 Jan 2023, Roderick Colenbrander wrote:

> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Reported-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <error27@gmail.com>
> Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>

Applied to for-6.3/sony.
diff mbox series

Patch

diff --git a/drivers/hid/hid-playstation.c b/drivers/hid/hid-playstation.c
index f399bf0d3c8c..866cc4e94320 100644
--- a/drivers/hid/hid-playstation.c
+++ b/drivers/hid/hid-playstation.c
@@ -1759,11 +1759,10 @@  static int dualshock4_get_calibration_data(struct dualshock4 *ds4)
 				if (retries < 2) {
 					hid_warn(hdev, "Retrying DualShock 4 get calibration report (0x02) request\n");
 					continue;
-				} else {
-					ret = -EILSEQ;
-					goto err_free;
 				}
+
 				hid_err(hdev, "Failed to retrieve DualShock4 calibration info: %d\n", ret);
+				ret = -EILSEQ;
 				goto err_free;
 			} else {
 				break;