pci: Skip id checking if no id is passed
PATCH 1/1 pci: Skip id checking if no id is passed
Will get warning when pci stub driver is built-in kenel like:
pci-stub: invalid id string ""
So stop early if no id is passed.
Signed-off-by Yinghai Lu <[email protected]>
--- drivers/pci/pci-stub.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/pci/pci-stub.c +4 -0
@@ -47,6 +47,10 @@ static int __init pci_stub_init(void)if (rc)return rc; +/* no ids passed actually */ +if (ids[0 ] =='\0' ) +return 0 ; +/* add ids specified in the module parameter */ p = ids;while ((id =strsep (&p,"," ))) {
Jesse Barnes
AppliedQuoted 18 lines · On Wed, 17 Nov 2010 12:10:40 -0800 Yinghai Lu <[email protected]> wrote:
Will get warning when pci stub driver is built-in kenel like:
pci-stub: invalid id string ""So stop early if no id is passed.
Signed-off-by Yinghai Lu <[email protected]>--- drivers/pci/pci-stub.c | 4 ++++ 1 file changed, 4 insertions(+)Index:
linux-2.6/drivers/pci/pci-stub.c
===================================================================
drivers/pci/pci-stub.c static int __init pci_stub_init(void) · line 56
Quoted 10 lines
drivers/pci/pci-stub.c +4
-0@@ -47,6 +47,10 @@ static int __init pci_stub_init(void)if (rc)return rc; +/* no ids passed actually */ +if (ids[0 ] =='\0' ) +return 0 ; +/* add ids specified in the module parameter */ p = ids;while ((id =strsep (&p,"," ))) {
Applied to linux-next, thanks.
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center