summaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorBasavaraj Natikar <Basavaraj.Natikar@amd.com>2023-05-09 12:28:56 +0530
committerJiri Kosina <jkosina@suse.cz>2023-05-23 15:58:30 +0200
commitc0709c6c9bc6b3a3423da3bea51db36308776604 (patch)
tree7de09f3a756c9215c83204fc2e2cfd8c9c57f9f4 /drivers/hid
parent5ca505c6b0259606361d8f95b0811b783d4e78f7 (diff)
downloadlinux-stable-c0709c6c9bc6b3a3423da3bea51db36308776604.tar.gz
linux-stable-c0709c6c9bc6b3a3423da3bea51db36308776604.tar.bz2
linux-stable-c0709c6c9bc6b3a3423da3bea51db36308776604.zip
HID: amd_sfh: Remove duplicate cleanup for SFH1.1
A duplicate cleanup is performed that is not necessary. As a result, remove duplicate cleanup and use common cleanup. Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c b/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c
index bb8bd7892b67..2102d53bd51f 100644
--- a/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c
+++ b/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c
@@ -174,20 +174,8 @@ static int amd_sfh1_1_hid_client_init(struct amd_mp2_dev *privdata)
cl_data->is_any_sensor_enabled = true;
cl_data->sensor_sts[i] = SENSOR_ENABLED;
rc = amdtp_hid_probe(i, cl_data);
- if (rc) {
- mp2_ops->stop(privdata, cl_data->sensor_idx[i]);
- status = amd_sfh_wait_for_response
- (privdata, cl_data->sensor_idx[i], DISABLE_SENSOR);
- if (status == 0)
- status = SENSOR_DISABLED;
- if (status != SENSOR_ENABLED)
- cl_data->sensor_sts[i] = SENSOR_DISABLED;
- dev_dbg(dev, "sid 0x%x (%s) status 0x%x\n",
- cl_data->sensor_idx[i],
- get_sensor_name(cl_data->sensor_idx[i]),
- cl_data->sensor_sts[i]);
+ if (rc)
goto cleanup;
- }
} else {
cl_data->sensor_sts[i] = SENSOR_DISABLED;
}