Skip to contentSkip to conversation

usb: gadget: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))

PATCH New Duan Jiong 1 participant 1 message Sep 26, 2013 USB

lore
Share & tools
lore

Duan Jiong

author
#0 lore raw

PATCH 1/1 usb: gadget: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))

---
 drivers/usb/gadget/configfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/configfs.c +1 -1
index 8f0d614..1bfacbf 100644
@@ -557,7 +557,7 @@ static struct config_group *function_make(
 
 	fi = usb_get_function_instance(func_name);
 	if (IS_ERR(fi))
-		return ERR_PTR(PTR_ERR(fi));
+		return ERR_CAST(fi);
 
 	ret = config_item_set_name(&fi->group.cg_item, name);
 	if (ret) {
Signature · 1 line
1.8.3.1