]> git.karo-electronics.de Git - karo-tx-linux.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)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Sun, 26 Jun 2011 16:46:29 +0000 (12:46 -0400)
commit9d50be820b662d0b13cef378ba14d7286f3dead5
tree500351b3d94f6286bb1e8fba42fd37e96133a929
parent609c53245412e6a93dcbe1c59d735e7d4ce12d03
PCI: pci-stub: ignore zero-length id parameters

commit 99a0fadf561e1f553c08f0a29f8b2578f55dd5f0 upstream.

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>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
drivers/pci/pci-stub.c