aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-09-01 01:57:02 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-09-01 01:57:02 -0400
commitf8dbab29f4d4b977a56776af0d5296b0e6386aef (patch)
tree2e35f68d206894b6298fc4e4c1fe7cc887d3a0f1 /drivers/staging
parentd657229ac4378700976fb2333c7433c5ea379d08 (diff)
[media] tm6000: Don't try to use a non-existing interface
> [34883.426065] tm6000 #0: registered device video0 > [34883.430591] Trident TVMaster TM5600/TM6000/TM6010 USB2 board (Load status: 0) > [34883.437763] usbcore: registered new interface driver tm6000 > [34884.608372] BUG: unable to handle kernel NULL pointer dereference at 00000002 > [34884.615514] IP: [<f8c4ceea>] tm6000_reset+0xd7/0x11c [tm6000] The dev->int_in USB interfaces is used by some devices for the Remote Controller. Not all devices seem to define this interface, so, tm6000_reset should not try to set the interface to it on such devices. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/tm6000/tm6000-core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/staging/tm6000/tm6000-core.c b/drivers/staging/tm6000/tm6000-core.c
index 9cef1d11a01e..b3c4e0529f4f 100644
--- a/drivers/staging/tm6000/tm6000-core.c
+++ b/drivers/staging/tm6000/tm6000-core.c
@@ -621,6 +621,12 @@ int tm6000_reset(struct tm6000_core *dev)
621 621
622 msleep(5); 622 msleep(5);
623 623
624 /*
625 * Not all devices have int_in defined
626 */
627 if (!dev->int_in.endp)
628 return 0;
629
624 err = usb_set_interface(dev->udev, dev->isoc_in.bInterfaceNumber, 2); 630 err = usb_set_interface(dev->udev, dev->isoc_in.bInterfaceNumber, 2);
625 if (err < 0) { 631 if (err < 0) {
626 tm6000_err("failed to select interface %d, alt. setting 2\n", 632 tm6000_err("failed to select interface %d, alt. setting 2\n",