summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-playstation.c
diff options
context:
space:
mode:
authorRoderick Colenbrander <roderick@gaikai.com>2023-01-05 17:59:06 -0800
committerJiri Kosina <jkosina@suse.cz>2023-01-18 10:11:48 +0100
commit5e25a8cdbe93c50f743e2ff0907996c697347864 (patch)
treeb9545b2059ed0103ff01482e964d30a23f208abd /drivers/hid/hid-playstation.c
parent4f1f391869eecb11d57e9e07ddec143ff3dc08ee (diff)
HID: playstation: fix DualShock4 unreachable calibration code.
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> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-playstation.c')
-rw-r--r--drivers/hid/hid-playstation.c5
1 files changed, 2 insertions, 3 deletions
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;