diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2006-09-25 14:31:15 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-09-28 18:36:45 -0400 |
commit | 2de9eaefa7330b8e3d3fc5f31288cb1e826173a8 (patch) | |
tree | da2121f71043fa686167abacfb69c644cacda53d /drivers/usb | |
parent | efd54a364121f61b2050b1df5ecb1b8329c4eaba (diff) |
USB: g_file_storage: fix "ignoring return value" warnings
This patch (as792) fixes "ignoring return value" warnings in
file_storage.c.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/file_storage.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index 8d7f1e84cd7b..d472c9c29904 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c | |||
@@ -3873,21 +3873,26 @@ static int __init fsg_bind(struct usb_gadget *gadget) | |||
3873 | for (i = 0; i < fsg->nluns; ++i) { | 3873 | for (i = 0; i < fsg->nluns; ++i) { |
3874 | curlun = &fsg->luns[i]; | 3874 | curlun = &fsg->luns[i]; |
3875 | curlun->ro = mod_data.ro[i]; | 3875 | curlun->ro = mod_data.ro[i]; |
3876 | curlun->dev.release = lun_release; | ||
3876 | curlun->dev.parent = &gadget->dev; | 3877 | curlun->dev.parent = &gadget->dev; |
3877 | curlun->dev.driver = &fsg_driver.driver; | 3878 | curlun->dev.driver = &fsg_driver.driver; |
3878 | dev_set_drvdata(&curlun->dev, fsg); | 3879 | dev_set_drvdata(&curlun->dev, fsg); |
3879 | snprintf(curlun->dev.bus_id, BUS_ID_SIZE, | 3880 | snprintf(curlun->dev.bus_id, BUS_ID_SIZE, |
3880 | "%s-lun%d", gadget->dev.bus_id, i); | 3881 | "%s-lun%d", gadget->dev.bus_id, i); |
3881 | 3882 | ||
3882 | if ((rc = device_register(&curlun->dev)) != 0) | 3883 | if ((rc = device_register(&curlun->dev)) != 0) { |
3883 | INFO(fsg, "failed to register LUN%d: %d\n", i, rc); | 3884 | INFO(fsg, "failed to register LUN%d: %d\n", i, rc); |
3884 | else { | 3885 | goto out; |
3885 | curlun->registered = 1; | 3886 | } |
3886 | curlun->dev.release = lun_release; | 3887 | if ((rc = device_create_file(&curlun->dev, |
3887 | device_create_file(&curlun->dev, &dev_attr_ro); | 3888 | &dev_attr_ro)) != 0 || |
3888 | device_create_file(&curlun->dev, &dev_attr_file); | 3889 | (rc = device_create_file(&curlun->dev, |
3889 | kref_get(&fsg->ref); | 3890 | &dev_attr_file)) != 0) { |
3891 | device_unregister(&curlun->dev); | ||
3892 | goto out; | ||
3890 | } | 3893 | } |
3894 | curlun->registered = 1; | ||
3895 | kref_get(&fsg->ref); | ||
3891 | 3896 | ||
3892 | if (mod_data.file[i] && *mod_data.file[i]) { | 3897 | if (mod_data.file[i] && *mod_data.file[i]) { |
3893 | if ((rc = open_backing_file(curlun, | 3898 | if ((rc = open_backing_file(curlun, |