diff options
author | Jiri Kosina <jkosina@suse.cz> | 2008-12-30 00:49:59 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-18 10:44:02 -0800 |
commit | 289d9932868a23c3b05d0c92ed756ca59b682cc8 (patch) | |
tree | 51d77d211d1b574b23c0bde9a7865f17797dc4e7 /drivers/hid | |
parent | c95f436126f6b5fb369d8f762f4d3c8c40621184 (diff) |
HID: fix error condition propagation in hid-sony driver
commit 4dfdc46468a142216b284eea66040f49df3f7191 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-sony.c | 2 |
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) } ret = sony_set_operational(hdev); - if (ret) + if (ret < 0) goto err_stop; return 0; |