Skip to content

Commit

Permalink
[media] tm6000: Fix check for interrupt endpoint
Browse files Browse the repository at this point in the history
Checking for &dev->int_in is useless because it returns the address of
the embedded struct tm6000_endpoint, which will always be positive and
therefore true.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Thierry Reding authored and Mauro Carvalho Chehab committed Dec 11, 2011
1 parent 875f0e3 commit 4be9c8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/media/video/tm6000/tm6000-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ int tm6000_ir_init(struct tm6000_core *dev)
rc->scanmask = 0xffff;
rc->priv = ir;
rc->change_protocol = tm6000_ir_change_protocol;
if (&dev->int_in) {
if (dev->int_in.endp) {
rc->open = __tm6000_ir_int_start;
rc->close = __tm6000_ir_int_stop;
INIT_DELAYED_WORK(&ir->work, tm6000_ir_int_work);
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/video/tm6000/tm6000-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1612,7 +1612,7 @@ static int tm6000_release(struct file *file)

usb_reset_configuration(dev->udev);

if (&dev->int_in)
if (dev->int_in.endp)
usb_set_interface(dev->udev,
dev->isoc_in.bInterfaceNumber, 2);
else
Expand Down

0 comments on commit 4be9c8f

Please sign in to comment.