HID: sensor-hub: Remove pointless NULL check
authorAlan Cox <alan@linux.intel.com>
Tue, 20 Nov 2012 16:33:14 +0000 (16:33 +0000)
committerJiri Kosina <jkosina@suse.cz>
Tue, 20 Nov 2012 16:35:57 +0000 (17:35 +0100)
report cannot be NULL, fortunately as we use it before we check !

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-sensor-hub.c

index d9d73e9163ebb4f2e8956746b88e1c6e0b575877..4ff24977544dd265c32b7ea027536dbb30219e1d 100644 (file)
@@ -437,9 +437,6 @@ static int sensor_hub_raw_event(struct hid_device *hdev,
        ptr = raw_data;
        ptr++; /*Skip report id*/
 
-       if (!report)
-               goto err_report;
-
        spin_lock_irqsave(&pdata->lock, flags);
 
        for (i = 0; i < report->maxfield; ++i) {
@@ -485,7 +482,6 @@ static int sensor_hub_raw_event(struct hid_device *hdev,
                                callback->pdev);
        spin_unlock_irqrestore(&pdata->lock, flags);
 
-err_report:
        return 1;
 }