* [PATCH -next] [media] Input: fix missing unlock on error in rmi_f54_request_report()
@ 2016-09-13 14:24 Wei Yongjun
2016-09-15 20:24 ` Nick Dyer
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-09-13 14:24 UTC (permalink / raw)
To: Dmitry Torokhov, Mauro Carvalho Chehab, Hans Verkuil, Nick Dyer
Cc: Wei Yongjun, linux-input
From: Wei Yongjun <weiyongjun1@huawei.com>
Add the missing unlock before return from function
rmi_f54_request_report() in the error handling case.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/input/rmi4/rmi_f54.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/input/rmi4/rmi_f54.c b/drivers/input/rmi4/rmi_f54.c
index bd86d3d..99a8836 100644
--- a/drivers/input/rmi4/rmi_f54.c
+++ b/drivers/input/rmi4/rmi_f54.c
@@ -198,8 +198,10 @@ static int rmi_f54_request_report(struct rmi_function *fn, u8 report_type)
mutex_lock(&f54->data_mutex);
error = rmi_write(rmi_dev, fn->fd.command_base_addr, F54_GET_REPORT);
- if (error < 0)
+ if (error < 0) {
+ mutex_unlock(&f54->data_mutex);
return error;
+ }
init_completion(&f54->cmd_done);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] [media] Input: fix missing unlock on error in rmi_f54_request_report()
2016-09-13 14:24 [PATCH -next] [media] Input: fix missing unlock on error in rmi_f54_request_report() Wei Yongjun
@ 2016-09-15 20:24 ` Nick Dyer
0 siblings, 0 replies; 2+ messages in thread
From: Nick Dyer @ 2016-09-15 20:24 UTC (permalink / raw)
To: Wei Yongjun
Cc: Dmitry Torokhov, Mauro Carvalho Chehab, Hans Verkuil, Wei Yongjun,
linux-input
On Tue, Sep 13, 2016 at 02:24:50PM +0000, Wei Yongjun wrote:
> Add the missing unlock before return from function
> rmi_f54_request_report() in the error handling case.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Nick Dyer <nick@shmanahar.org>
> ---
> drivers/input/rmi4/rmi_f54.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/input/rmi4/rmi_f54.c b/drivers/input/rmi4/rmi_f54.c
> index bd86d3d..99a8836 100644
> --- a/drivers/input/rmi4/rmi_f54.c
> +++ b/drivers/input/rmi4/rmi_f54.c
> @@ -198,8 +198,10 @@ static int rmi_f54_request_report(struct rmi_function *fn, u8 report_type)
> mutex_lock(&f54->data_mutex);
>
> error = rmi_write(rmi_dev, fn->fd.command_base_addr, F54_GET_REPORT);
> - if (error < 0)
> + if (error < 0) {
> + mutex_unlock(&f54->data_mutex);
> return error;
> + }
>
> init_completion(&f54->cmd_done);
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-15 20:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-13 14:24 [PATCH -next] [media] Input: fix missing unlock on error in rmi_f54_request_report() Wei Yongjun
2016-09-15 20:24 ` Nick Dyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).