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>
This commit is contained in:
Jiri Kosina 2008-12-30 00:49:59 +01:00
parent b8a832b1c0
commit 4dfdc46468
1 changed files with 1 additions and 1 deletions

View File

@ -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;