Skip to content

Commit c0709c6

Browse files
basuamdJiri Kosina
authored andcommitted
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 5ca505c commit c0709c6

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -174,20 +174,8 @@ static int amd_sfh1_1_hid_client_init(struct amd_mp2_dev *privdata)
174174
cl_data->is_any_sensor_enabled = true;
175175
cl_data->sensor_sts[i] = SENSOR_ENABLED;
176176
rc = amdtp_hid_probe(i, cl_data);
177-
if (rc) {
178-
mp2_ops->stop(privdata, cl_data->sensor_idx[i]);
179-
status = amd_sfh_wait_for_response
180-
(privdata, cl_data->sensor_idx[i], DISABLE_SENSOR);
181-
if (status == 0)
182-
status = SENSOR_DISABLED;
183-
if (status != SENSOR_ENABLED)
184-
cl_data->sensor_sts[i] = SENSOR_DISABLED;
185-
dev_dbg(dev, "sid 0x%x (%s) status 0x%x\n",
186-
cl_data->sensor_idx[i],
187-
get_sensor_name(cl_data->sensor_idx[i]),
188-
cl_data->sensor_sts[i]);
177+
if (rc)
189178
goto cleanup;
190-
}
191179
} else {
192180
cl_data->sensor_sts[i] = SENSOR_DISABLED;
193181
}

0 commit comments

Comments
 (0)