Re: [PATCH v2] leds: add new lp8788 led driver

From: devendra.aaru
Date: Fri Jul 20 2012 - 12:24:01 EST


Hi,

I think a mutex_unlock is missed out,

On Fri, Jul 20, 2012 at 2:28 PM, Kim, Milo <Milo.Kim@xxxxxx> wrote:
> +
> +static void lp8788_led_work(struct work_struct *work)
> +{
> + struct lp8788_led *led = container_of(work, struct lp8788_led, work);
> + enum lp8788_isink_number num = led->isink_num;
> + int enable;
> + u8 val = led->brightness;
> +
> + mutex_lock(&led->lock);
> +
> + switch (num) {
> + case LP8788_ISINK_1:
> + case LP8788_ISINK_2:
> + case LP8788_ISINK_3:
> + lp8788_write_byte(led->lp, lp8788_pwm_addr[num], val);
> + break;
> + default:
missed mutex_unlock
> + return;
> + }
> +
> + enable = (val > 0) ? 1 : 0;
> + if (enable != led->on)
> + lp8788_led_enable(led, num, enable);
> +
> + mutex_unlock(&led->lock);
> +}
> +

Thanks,
Devendra
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/