From: Felipe Balbi Date: Mon, 10 Mar 2014 18:30:56 +0000 (-0500) Subject: usb: gadget: composite: switch over to ERR_CAST() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=dad4babe419ef2f3e14447a650ce1f760a6ee9e0;p=linux-beck.git 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 Signed-off-by: Greg Kroah-Hartman --- 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);