diff mbox

[2/4] usb: gadget: f_subset: switch over to PTR_RET

Message ID 1394476256-2902-3-git-send-email-balbi@ti.com
State Accepted
Commit f3c73649828397ca6bae88bcb8cd70bbcbb65b18
Headers show

Commit Message

Felipe Balbi March 10, 2014, 6:30 p.m. UTC
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>
---
 drivers/usb/gadget/f_subset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/usb/gadget/f_subset.c b/drivers/usb/gadget/f_subset.c
index f1a5919..df4a0dcb 100644
--- a/drivers/usb/gadget/f_subset.c
+++ b/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)