Browse Source

usb: gadget: f_subset: switch over to PTR_RET

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>
Felipe Balbi 11 years ago
parent
commit
f3c7364982
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/usb/gadget/f_subset.c

+ 1 - 1
drivers/usb/gadget/f_subset.c

@@ -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)