public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2]drivers/usb/core/sysfs.c Fix variable 'retval' set but not used
@ 2010-08-03  4:26 Justin P. Mattock
  2010-08-03  4:26 ` [PATCH 2/2]drivers/usb/host/ehci-hub.c Fix variable 'i' " Justin P. Mattock
  2010-08-03 11:28 ` [PATCH 1/2]drivers/usb/core/sysfs.c Fix variable 'retval' " Valdis.Kletnieks
  0 siblings, 2 replies; 13+ messages in thread
From: Justin P. Mattock @ 2010-08-03  4:26 UTC (permalink / raw)
  To: linux-usb; +Cc: dbrownell, gregkh, linux-kernel, Justin P. Mattock

The below fixes a warning generated by GCC:
  CC      drivers/usb/core/sysfs.o
drivers/usb/core/sysfs.c: In function 'usb_create_sysfs_intf_files':
drivers/usb/core/sysfs.c:889:6: warning: variable 'retval' set but not used

Let me know if these are totally wrong etc.. And I'll try
my best to resend properly..

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>

---
 drivers/usb/core/sysfs.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c
index 448f5b4..af56b3e 100644
--- a/drivers/usb/core/sysfs.c
+++ b/drivers/usb/core/sysfs.c
@@ -886,7 +886,6 @@ int usb_create_sysfs_intf_files(struct usb_interface *intf)
 {
 	struct usb_device *udev = interface_to_usbdev(intf);
 	struct usb_host_interface *alt = intf->cur_altsetting;
-	int retval;
 
 	if (intf->sysfs_files_created || intf->unregistering)
 		return 0;
@@ -895,7 +894,7 @@ int usb_create_sysfs_intf_files(struct usb_interface *intf)
 			!(udev->quirks & USB_QUIRK_CONFIG_INTF_STRINGS))
 		alt->string = usb_cache_string(udev, alt->desc.iInterface);
 	if (alt->string)
-		retval = device_create_file(&intf->dev, &dev_attr_interface);
+		device_create_file(&intf->dev, &dev_attr_interface);
 	intf->sysfs_files_created = 1;
 	return 0;
 }
-- 
1.7.1.rc1.21.gf3bd6


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-08-03 17:22 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-03  4:26 [PATCH 1/2]drivers/usb/core/sysfs.c Fix variable 'retval' set but not used Justin P. Mattock
2010-08-03  4:26 ` [PATCH 2/2]drivers/usb/host/ehci-hub.c Fix variable 'i' " Justin P. Mattock
2010-08-03 11:28 ` [PATCH 1/2]drivers/usb/core/sysfs.c Fix variable 'retval' " Valdis.Kletnieks
2010-08-03 13:30   ` Justin P. Mattock
2010-08-03 14:29   ` Alan Stern
2010-08-03 14:43     ` Justin P. Mattock
2010-08-03 15:36       ` Alan Stern
2010-08-03 16:12         ` Justin P. Mattock
2010-08-03 15:13     ` Valdis.Kletnieks
2010-08-03 15:34       ` Alan Stern
2010-08-03 15:46         ` Greg KH
2010-08-03 17:09           ` Alan Stern
2010-08-03 17:22             ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox