w1: w1_ds28e04: unlock on error path in w1_f1C_write_pio()
Subsystems (2)
PATCH 1/1 w1: w1_ds28e04: unlock on error path in w1_f1C_write_pio()
We should unlock here before returning.
Signed-off-by Dan Carpenter <[email protected]>
drivers/w1/slaves/w1_ds28e04.c +3 -1
@@ -309,8 +309,10 @@ static ssize_t w1_f1C_write_pio(struct file *filp, struct kobject *kobj,mutex_lock (&sl->master->mutex);/* Write the PIO data */ -if (w1_reset_select_slave (sl)) +if (w1_reset_select_slave (sl)) { +mutex_unlock (&sl->master->mutex);return -1 ; + }/* set bit 7..2 to value '1' */ *buf = *buf |0xFC ;
Quoted 1 line · Dan Carpenter
We should unlock here before returning.
Looks good, thank you, Dan
Quoted 1 line
Signed-off-by Dan Carpenter <[email protected]>
Greg, please pull it into your tree
Acked-by Evgeniy Polyakov <[email protected]>
Signature · 1 line
Evgeniy Polyakov