usb: gadget: f_subset: switch over to PTR_RET
authorFelipe Balbi <balbi@ti.com>
Mon, 10 Mar 2014 18:30:54 +0000 (13:30 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Mar 2014 23:05:31 +0000 (16:05 -0700)
this patch fixes the following Coccinelle warning:

drivers/usb/gadget/f_subset.c:279:8-14: WARNING: \
PTR_RET can be used

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/f_subset.c

index f1a59190ac9a0b2ad002ca5a0ebcd3d9668126b6..df4a0dcbc99350f70d84e8c77a1bb0713041ac9b 100644 (file)
@@ -276,7 +276,7 @@ static int geth_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
        }
 
        net = gether_connect(&geth->port);
-       return IS_ERR(net) ? PTR_ERR(net) : 0;
+       return PTR_RET(net);
 }
 
 static void geth_disable(struct usb_function *f)