]> git.karo-electronics.de Git - karo-tx-linux.git/commit
USB: remove optional bus bindings in isp1760, fixing runtime warning
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Sun, 2 Nov 2008 14:25:42 +0000 (15:25 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 20 Nov 2008 22:54:51 +0000 (14:54 -0800)
commit2630765e027d3cd600839b8dd59e7d5691428aff
tree5798eb2576047d6fea862e29fb91a0e077f383b2
parent257379190a7c3ca37afd780548d0471ab45000bf
USB: remove optional bus bindings in isp1760, fixing runtime warning

commit ff30bf1ca4b548c0928dae6bfce89458b95e5bf4 upstream.

Roland Reported the following:
| kmem_cache_create: duplicate cache isp1760_qtd
| Pid: 461, comm: modprobe Tainted: G        W  2.6.28-rc2-git3-default #4
| Call Trace:
|  [<c017540e>] kmem_cache_create+0xc9/0x3a3
|  [<c0159a8d>] free_pages_bulk+0x16c/0x1c9
|  [<f165c05f>] isp1760_init+0x0/0xb [isp1760]
|  [<f165c018>] init_kmem_once+0x18/0x5f [isp1760]
|  [<f165c064>] isp1760_init+0x5/0xb [isp1760]
|  [<c010113d>] _stext+0x4d/0x148
|  [<c0142936>] load_module+0x12cd/0x142e
|  [<c01743c4>] kmem_cache_destroy+0x0/0xd7
|  [<c0142b1e>] sys_init_module+0x87/0x176
|  [<c01039eb>] sysenter_do_call+0x12/0x2f

The reason, is that ret is initialized with ENODEV instead of 0 _or_
the kmem cache is not freed in error case with no bus binding.

The difference between OF+PCI and OF only is
| 15148     804      32   15984    3e70 isp1760-of-pci.o
| 13748     676       8   14432    3860 isp1760-of.o

about 1.5 KiB.

Until there is a checkbox where the user *must* select atleast one item,
and may select multiple entries I don't make it selectable anymore.
Having a driver which can't be used under any circumstances is broken
anyway and I've seen distros shipping it that way.

Reported-by: Roland Kletzing <devzero@web.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/Kconfig
drivers/usb/host/isp1760-if.c