HID: hid-lg: Only one of LG_FF flags can be set for a given device
authorMichal Malý <madcatxster@devoid-pointer.net>
Wed, 8 Apr 2015 20:56:53 +0000 (22:56 +0200)
committerJiri Kosina <jkosina@suse.cz>
Thu, 7 May 2015 14:27:18 +0000 (16:27 +0200)
Only one of LG_FF flags can be set for a given device.

Signed-off-by: Michal Malý <madcatxster@devoid-pointer.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-lg.c

index d5022b3130d0b40a4c726c1b287745312f94f98e..429340d809b5546341d09fc6a3bea6fedb525497 100644 (file)
@@ -714,11 +714,11 @@ static int lg_probe(struct hid_device *hdev, const struct hid_device_id *id)
 
        if (drv_data->quirks & LG_FF)
                ret = lgff_init(hdev);
-       if (drv_data->quirks & LG_FF2)
+       else if (drv_data->quirks & LG_FF2)
                ret = lg2ff_init(hdev);
-       if (drv_data->quirks & LG_FF3)
+       else if (drv_data->quirks & LG_FF3)
                ret = lg3ff_init(hdev);
-       if (drv_data->quirks & LG_FF4)
+       else if (drv_data->quirks & LG_FF4)
                ret = lg4ff_init(hdev);
 
        if (ret)