Re: [PATCH -next] pinctrl: tb10x: fix the error handling in tb10x_pinctrl_probe()

From: Linus Walleij
Date: Wed Oct 23 2013 - 04:45:27 EST


On Mon, Oct 21, 2013 at 4:55 AM, Wei Yongjun <weiyj.lk@xxxxxxxxx> wrote:

> From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
>
> This patch fix the error handling in tb10x_pinctrl_probe():
> - devm_ioremap_resource() return ERR_PTR() and never return NULL
> - remove the dev_err call to avoid redundant error message
> - pinctrl_register() returns NULL not ERR_PTR()
>
> Signed-off-by: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>

Thanks, patch applied!

Hm this seems to be an easy mistake to do. I have discussed
in the past whether we can make the compiler verify
error pointers semantically and warn on problems.

I don't know if that is achieveable though :-(

Yours,
Linus Walleij
--
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/