Re: [PATCH 2/2] ARM: amba: Auto-generate AMBA driver module aliasesduring modpost

From: Dave Martin
Date: Mon Nov 21 2011 - 09:18:25 EST


On Mon, Nov 21, 2011 at 02:10:22PM +0100, Uwe Kleine-König wrote:
> Hello Dave,
>
> On Mon, Nov 21, 2011 at 10:48:30AM +0000, Dave Martin wrote:
> > --- a/drivers/amba/bus.c
> > +++ b/drivers/amba/bus.c
> > @@ -52,7 +52,14 @@ static int amba_uevent(struct device *dev, struct kobj_uevent_env *env)
> > int retval = 0;
> >
> > retval = add_uevent_var(env, "AMBA_ID=%08x", pcdev->periphid);
> > - return retval;
> > + if (retval)
> > + return retval;
> > +
> > + retval = add_uevent_var(env, "MODALIAS=amba:d%08X", pcdev->periphid);
> > + if (retval)
> > + return retval;
> > +
> > + return 0;
> Just return retval here?

Hmmm, yes -- I'm not sure why I did things that way.
I'll get rid of the final if () and do as you suggest.

Cheers
---Dave
--
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/