aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-sony.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2008-12-29 18:49:59 -0500
committerJiri Kosina <jkosina@suse.cz>2009-01-03 19:01:43 -0500
commit4dfdc46468a142216b284eea66040f49df3f7191 (patch)
tree771f8c4abcecd8e7ac80bc61f97318f24f852fd9 /drivers/hid/hid-sony.c
parentb8a832b1c0a70531b4bd69a67aa0bf72f6f2dc34 (diff)
HID: fix error condition propagation in hid-sony driver
sony_set_operational() only propagates return value from usb_control_msg(), which returns negative on error and number of transferred bytes otherwise. Reported-by: Marcin Tolysz <tolysz@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-sony.c')
-rw-r--r--drivers/hid/hid-sony.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index 86e563b8d644..dd5a3979a4de 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -102,7 +102,7 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
102 } 102 }
103 103
104 ret = sony_set_operational(hdev); 104 ret = sony_set_operational(hdev);
105 if (ret) 105 if (ret < 0)
106 goto err_stop; 106 goto err_stop;
107 107
108 return 0; 108 return 0;