Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: synaptics-rmi4 - unlock on error

We should unlock before returning on this error path.

Fixes: 3a762dbd5347 ('[media] Input: synaptics-rmi4 - add support for F54 diagnostics')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Dan Carpenter and committed by
Dmitry Torokhov
792f497b 82264d0c

+3 -2
+3 -2
drivers/input/rmi4/rmi_f54.c
··· 200 200 201 201 error = rmi_write(rmi_dev, fn->fd.command_base_addr, F54_GET_REPORT); 202 202 if (error < 0) 203 - return error; 203 + goto unlock; 204 204 205 205 init_completion(&f54->cmd_done); 206 206 ··· 209 209 210 210 queue_delayed_work(f54->workqueue, &f54->work, 0); 211 211 212 + unlock: 212 213 mutex_unlock(&f54->data_mutex); 213 214 214 - return 0; 215 + return error; 215 216 } 216 217 217 218 static size_t rmi_f54_get_report_size(struct f54_data *f54)