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

From: Andrew Morton
Date: Fri Jul 07 2006 - 20:05:48 EST


"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?
-
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/