Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Felipe Balbi and committed by
Greg Kroah-Hartman
dad4babe 3b74c73f

+1 -1
+1 -1
drivers/usb/gadget/composite.c
··· 1139 1139 1140 1140 uc = copy_gadget_strings(sp, n_gstrings, n_strings); 1141 1141 if (IS_ERR(uc)) 1142 - return ERR_PTR(PTR_ERR(uc)); 1142 + return ERR_CAST(uc); 1143 1143 1144 1144 n_gs = get_containers_gs(uc); 1145 1145 ret = usb_string_ids_tab(cdev, n_gs[0]->strings);