'usb_free_urb(urb)' is a no-op, because urb is known to be NULL.
It is likelly that releasing resources allocated by
'tm6000_alloc_urb_buffers()' just a few lines above is expected here.
This has been spotted by the following coccinelle script:
@@
expression ret, x, e;
identifier f;
@@
*   if (x == NULL)
    {
     ... when != x = e;
(
*    f(<+...x...+>);
|
*    ret = f(<+...x...+>);
)
     ...
    }
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
                urb = usb_alloc_urb(max_packets, GFP_KERNEL);
                if (!urb) {
                        tm6000_uninit_isoc(dev);
-                       usb_free_urb(urb);
+                       tm6000_free_urb_buffers(dev);
                        return -ENOMEM;
                }
                dev->isoc_ctl.urb[i] = urb;