Re: [patch] PCI: check the return value ofdevice_create_bin_file() in pci_create_bus()

From: Simon Horman
Date: Tue Aug 05 2008 - 08:18:21 EST


On Tue, Aug 05, 2008 at 05:28:14AM -0600, Matthew Wilcox wrote:
> On Tue, Aug 05, 2008 at 09:14:07PM +1000, Simon Horman wrote:
> > Check the return value of device_create_bin_file in pci_create_bus,
> > unwind if necessary, and propagate any errors to the caller.
>
> Yes, but you're essentially saying here that if I can't create a couple
> of poxy sysfs files, I can't have this PCI bus at all? This seems like
> a bad decision to me. I'd rather have a PCI bus without the files than
> no PCI bus at all. By all means, we should whinge mightily if we can't
> create the files so the sysadmin has a chance of figuring out why things
> aren't quite working right, but I might have my root filesystem on a
> device on that PCI bus.

Are you suggesting just making pci_create_bus() have a big winge
using printk() but returning void regardless of what happens?
That sounds fine to me, though I guess it would also need to unwind
if the first call to device_create_bin_file() succeeds but the second
one doesn't.
--
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/