Re: [PATCH] PCIE: create sysfs directory on first use

From: Randy.Dunlap
Date: Fri Jul 07 2006 - 20:13:20 EST


On Fri, 7 Jul 2006 17:10:15 -0700 Andrew Morton wrote:

> "Randy.Dunlap" <rdunlap@xxxxxxxxxxxx> wrote:
> >
> > + if (!pcie_dev_registered)
> > + pcie_port_bus_register();
> > +
>
> Wonderful. You're forced to drop all error checking on the floor because
> pcie_port_bus_register() assumes that nobody could possibly ever be
> interested in actually checking for errors.
>
> What happens if the bus_register() fails and the driver cheerily blunders
> along assuming that pcie_port_bus_type is registered? Incomprehensible lkml
> oops reports, I'm suspecting..
>
> Let's start stamping this out. Could I please ask that you first prepare a
> patch which fixes pcie_port_bus_register() (and mark it __must_check) and
> then let's actually, like, check for errors?

Sure, will do.

And will make changes that Valdis mentioned.

---
~Randy
-
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/