aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3
diff options
context:
space:
mode:
authorGuenter Roeck2021-04-24 07:54:43 -0700
committerGreg Kroah-Hartman2021-05-10 11:16:10 +0200
commitd2d9b94164862f06207b60310ae3854f5f0058ad (patch)
tree7fadd8c7f5969174c5a18973b8f96c82b920aabc /drivers/usb/dwc3
parent29a812e4f3462c7020368a1f5b6cd7814225d983 (diff)
usb: gadget: Drop unnecessary NULL checks after container_of
The parameters passed to allow_link and drop_link functions are never NULL. That means the result of container_of() on those parameters is also never NULL, even though the reference into the structure points to the first element of the structure. Remove the unnecessary NULL checks. This change was made automatically with the following Coccinelle script. A now obsolete 'out:' label was removed manually. @@ type t; identifier v; statement s; @@ <+... ( t v = container_of(...); | v = container_of(...); ) ... when != v - if (\( !v \| v == NULL \) ) s ...+> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Felipe Balbi <balbi@kernel.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Felipe Balbi <balbi@kernel.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20210424145443.170413-1-linux@roeck-us.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc3')
0 files changed, 0 insertions, 0 deletions