]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: pci-stub: ignore zero-length id parameters
authorTejun Heo <tj@kernel.org>
Wed, 22 Dec 2010 09:06:36 +0000 (10:06 +0100)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Thu, 23 Dec 2010 20:53:52 +0000 (12:53 -0800)
commit70ba7b4548ff185933d0bf306ef4a5b92aaedd26
tree97bf80533001e4aedf6e6e96e21c3cac4bd37641
parent49e210e1e45255c8e8fe16b82cdaeda93643c0df
PCI: pci-stub: ignore zero-length id parameters

pci-stub uses strsep() to separate list of ids and generates a warning
message when it fails to parse an id.  However, not specifying the
parameter results in ids set to an empty string.  strsep() happily
returns the empty string as the first token and thus triggers the
warning message spuriously.

Make the tokner ignore zero length ids.

Reported-by: Chris Wright <chrisw@sous-sol.org>
Reported-by: Prasad Joshi <P.G.Joshi@student.reading.ac.uk>
Cc: stable@kernel.org
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/pci-stub.c