From: Sebastian Andrzej Siewior Date: Wed, 19 Jun 2013 15:38:10 +0000 (+0200) Subject: usb: musb: musbhsdma: drop the controller check in dma_controller_destroy() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ff2283229da616d9a029eaa0d483fa8b0ad55e77;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git usb: musb: musbhsdma: drop the controller check in dma_controller_destroy() This check is hardly required and alas is wrong. 'c' might be NULL but the chances are low that 'controller' after the container_of() becomes NULL. Since no other DMA implementation is doing that and musb-core does not call it with a NULL pointer it can dropped. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c index 3d1fd52a15a9..3f5e121dc154 100644 --- a/drivers/usb/musb/musbhsdma.c +++ b/drivers/usb/musb/musbhsdma.c @@ -371,9 +371,6 @@ void dma_controller_destroy(struct dma_controller *c) struct musb_dma_controller *controller = container_of(c, struct musb_dma_controller, controller); - if (!controller) - return; - if (controller->irq) free_irq(controller->irq, c);