[PATCH V2 1/6] pinctrl: pinctrl-single: use arch_initcall and module_exit
Vishwanathrao Badarkhe, Manish
manishv.b at ti.com
Wed Feb 6 01:04:22 EST 2013
Hi Russell,
On Tue, Feb 05, 2013 at 16:57:31, Russell King - ARM Linux wrote:
> On Tue, Feb 05, 2013 at 06:36:34AM +0000, Vishwanathrao Badarkhe, Manish wrote:
> > I made following changes, in order to update "dip->p" pointer with
> > correct value:
> >
> > - if (!dpi->p) {
> > + if (IS_ERR_OR_NULL(dpi->p)) {
> > dpi->p = devm_pinctrl_get(dev);
> > - if (IS_ERR_OR_NULL(dpi->p)) {
> > - int ret = PTR_ERR(dpi->p);
> > -
> > - dev_dbg(dev, "no pinctrl handle\n");
> > - /* Only return deferrals */
> > - if (ret == -EPROBE_DEFER)
> > - return ret;
> > - return 0;
> > - }
> > + ret = PTR_ERR(dpi->p);
> > + dev_dbg(dev, "no pinctrl handle\n");
> > + /* Only return deferrals */
> > + if (ret == -EPROBE_DEFER)
> > + return ret;
> > + return 0;
> >
> > Is this intended change?
>
> The above looks totally broken to me.
>
> Oh, it's using IS_ERR_OR_NULL(), so it's bound to be broken.
>
I went through discussion in community on usage of "IS_ERR_OR_NULL".
https://patchwork.kernel.org/patch/1953271/
Will take care not use this in future.
Thanks,
Manish
More information about the linux-arm-kernel
mailing list