Skip to content

Commit

Permalink
HID: sensor-hub: Remove pointless NULL check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Cox authored and Jiri Kosina committed Nov 20, 2012
1 parent d339f61 commit e3bbe87
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/hid/hid-sensor-hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit e3bbe87

Please sign in to comment.