HID: sony: fix uninitialized per-controller spinlock
authorFrank Praznik <frank.praznik@oh.rr.com>
Mon, 23 Feb 2015 01:42:46 +0000 (20:42 -0500)
committerJiri Kosina <jkosina@suse.cz>
Mon, 23 Feb 2015 12:01:15 +0000 (13:01 +0100)
Per-controller spinlock needs to be properly initialized during device probe.

[jkosina@suse.cz: massage changelog]
[jkosina@suse.cz: drop hunk that has already been applied by previous
 patch]
Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-sony.c

index e87148dbeb1b3d3fed693db7582d4b5ade155f7f..1896c019e302934aa13c6f9ac434c51637f450ce 100644 (file)
@@ -1944,6 +1944,8 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
                return -ENOMEM;
        }
 
+       spin_lock_init(&sc->lock);
+
        sc->quirks = quirks;
        hid_set_drvdata(hdev, sc);
        sc->hdev = hdev;