summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/composite.c
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2014-03-10 13:30:56 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-17 16:05:31 -0700
commitdad4babe419ef2f3e14447a650ce1f760a6ee9e0 (patch)
treef540783bbb3d956d4c6681fd3140ba2796a13345 /drivers/usb/gadget/composite.c
parent3b74c73f8d6f053f422e85fce955b61fb181cfe7 (diff)
usb: gadget: composite: switch over to ERR_CAST()
This patch fixes the following Coccinelle warning: drivers/usb/gadget/composite.c:1142:9-16: WARNING: \ ERR_CAST can be used with uc Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget/composite.c')
-rw-r--r--drivers/usb/gadget/composite.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index d742bed7a5fa..fab906429b80 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -1139,7 +1139,7 @@ struct usb_string *usb_gstrings_attach(struct usb_composite_dev *cdev,
uc = copy_gadget_strings(sp, n_gstrings, n_strings);
if (IS_ERR(uc))
- return ERR_PTR(PTR_ERR(uc));
+ return ERR_CAST(uc);
n_gs = get_containers_gs(uc);
ret = usb_string_ids_tab(cdev, n_gs[0]->strings);