USB: EHCI: Rearrange create_companion_file() to avoid GCC-4.6 warnings.
authorDavid Daney <ddaney@caviumnetworks.com>
Tue, 25 Jan 2011 17:59:37 +0000 (09:59 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 4 Feb 2011 19:43:59 +0000 (11:43 -0800)
commitac8d67417816fa7c568b24a8f2891eb02e6d0462
tree77ca466e0dc5bc7466292cc16292649132c82bf0
parenteb34a90861a290cd271f4b887c0d59070e1b69b0
USB: EHCI: Rearrange create_companion_file() to avoid GCC-4.6 warnings.

In create_companion_file() there is a bogus assignemt to i created for
the express purpose of avoiding an ignored return value warning.

With pre-release GCC-4.6, this causes a 'set but not used' warning.

Kick the problem further down the road by just returning i.  All the
callers of create_companion_file() ignore its return value, so all is
good:

o No warnings are issued.

o We still subvert the desires of the authors of device_create_file()
  by ignorning error conditions.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/ehci-hub.c