Hi,

I think a mutex_unlock is missed out,

On Fri, Jul 20, 2012 at 2:28 PM, Kim, Milo <milo....@ti.com> 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to