Hi Alexander,

On Sat, Apr 26, 2014 at 09:46:54AM +0400, Alexander Shiyan wrote:
> +     beep->desc = devm_gpiod_get(&pdev->dev, NULL);
> +     if (!beep->desc)
> +             return -EINVAL;

As far as I can see devm_gpiod_get() never returns NULL, but either a
valid pointer or ERR_PTR-encoded error. Why do we check for NULL?

I can drop the check myself, no need to resubmit.

>  
> -static struct of_device_id gpio_beeper_of_match[] = {
> +static struct of_device_id __maybe_unused gpio_beeper_of_match[] = {
>       { .compatible = BEEPER_MODNAME, },
>       { }
>  };

Instead of marking it as __maybe_unused we should wrap it in
#ifdef CONFIG_OF. I'll do it as well.

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to