diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dib0700_core.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/dvb/dvb-usb/dib0700_core.c b/drivers/media/dvb/dvb-usb/dib0700_core.c index ae4f999930fa..02290c60f72f 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_core.c +++ b/drivers/media/dvb/dvb-usb/dib0700_core.c | |||
@@ -679,6 +679,7 @@ static void dib0700_rc_urb_completion(struct urb *purb) | |||
679 | deb_info("%s()\n", __func__); | 679 | deb_info("%s()\n", __func__); |
680 | if (d->rc_dev == NULL) { | 680 | if (d->rc_dev == NULL) { |
681 | /* This will occur if disable_rc_polling=1 */ | 681 | /* This will occur if disable_rc_polling=1 */ |
682 | kfree(purb->transfer_buffer); | ||
682 | usb_free_urb(purb); | 683 | usb_free_urb(purb); |
683 | return; | 684 | return; |
684 | } | 685 | } |
@@ -687,6 +688,7 @@ static void dib0700_rc_urb_completion(struct urb *purb) | |||
687 | 688 | ||
688 | if (purb->status < 0) { | 689 | if (purb->status < 0) { |
689 | deb_info("discontinuing polling\n"); | 690 | deb_info("discontinuing polling\n"); |
691 | kfree(purb->transfer_buffer); | ||
690 | usb_free_urb(purb); | 692 | usb_free_urb(purb); |
691 | return; | 693 | return; |
692 | } | 694 | } |
@@ -781,8 +783,11 @@ int dib0700_rc_setup(struct dvb_usb_device *d) | |||
781 | dib0700_rc_urb_completion, d); | 783 | dib0700_rc_urb_completion, d); |
782 | 784 | ||
783 | ret = usb_submit_urb(purb, GFP_ATOMIC); | 785 | ret = usb_submit_urb(purb, GFP_ATOMIC); |
784 | if (ret) | 786 | if (ret) { |
785 | err("rc submit urb failed\n"); | 787 | err("rc submit urb failed\n"); |
788 | kfree(purb->transfer_buffer); | ||
789 | usb_free_urb(purb); | ||
790 | } | ||
786 | 791 | ||
787 | return ret; | 792 | return ret; |
788 | } | 793 | } |