]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
usb: gadget: fsl_udc_core: fix ep valid checks
authorStefan Agner <stefan@agner.ch>
Sun, 11 Feb 2018 23:14:42 +0000 (00:14 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:28:31 +0000 (12:28 +0200)
commite181a65b16d84a70fd089bb550a2cb6717ee2dad
tree748c81f60635e0a1393aeb99b8e3b7c18a5c8bfb
parentfdc693277099eedc41b08d47ffb02e9f5477bb6b
usb: gadget: fsl_udc_core: fix ep valid checks

BugLink: http://bugs.launchpad.net/bugs/1783418
[ Upstream commit 20c63f4089cceab803438c383631963e34c4d8e5 ]

Clang reports the following warning:
  drivers/usb/gadget/udc/fsl_udc_core.c:1312:10: warning: address of array
  'ep->name' will always evaluate to 'true' [-Wpointer-bool-conversion]
        if (ep->name)
        ~~  ~~~~^~~~

It seems that the authors intention was to check if the ep has been
configured through struct_ep_setup. Check whether struct usb_ep name
pointer has been set instead.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/usb/gadget/udc/fsl_udc_core.c