diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-04-13 09:39:06 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-18 18:37:35 -0400 |
commit | eda70f1dfc9e5165b9413dbf1ccb5c108f26a18c (patch) | |
tree | b22a3562f6aec42440eaadaee49b3cb785f51425 /drivers/w1 | |
parent | 8f1e12512e9f1276b68c8b14a60961658c73336f (diff) |
w1: w1_ds28e04: unlock on error path in w1_f1C_write_pio()
We should unlock here before returning.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/w1')
-rw-r--r-- | drivers/w1/slaves/w1_ds28e04.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/w1/slaves/w1_ds28e04.c b/drivers/w1/slaves/w1_ds28e04.c index f652db3782bf..4aa1aa90480d 100644 --- a/drivers/w1/slaves/w1_ds28e04.c +++ b/drivers/w1/slaves/w1_ds28e04.c | |||
@@ -309,8 +309,10 @@ static ssize_t w1_f1C_write_pio(struct file *filp, struct kobject *kobj, | |||
309 | mutex_lock(&sl->master->mutex); | 309 | mutex_lock(&sl->master->mutex); |
310 | 310 | ||
311 | /* Write the PIO data */ | 311 | /* Write the PIO data */ |
312 | if (w1_reset_select_slave(sl)) | 312 | if (w1_reset_select_slave(sl)) { |
313 | mutex_unlock(&sl->master->mutex); | ||
313 | return -1; | 314 | return -1; |
315 | } | ||
314 | 316 | ||
315 | /* set bit 7..2 to value '1' */ | 317 | /* set bit 7..2 to value '1' */ |
316 | *buf = *buf | 0xFC; | 318 | *buf = *buf | 0xFC; |