Skip to content

Commit e3bbe87

Browse files
Alan CoxJiri Kosina
authored andcommitted
HID: sensor-hub: Remove pointless NULL check
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>
1 parent d339f61 commit e3bbe87

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

‎drivers/hid/hid-sensor-hub.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -437,9 +437,6 @@ static int sensor_hub_raw_event(struct hid_device *hdev,
437437
ptr = raw_data;
438438
ptr++; /*Skip report id*/
439439

440-
if (!report)
441-
goto err_report;
442-
443440
spin_lock_irqsave(&pdata->lock, flags);
444441

445442
for (i = 0; i < report->maxfield; ++i) {
@@ -485,7 +482,6 @@ static int sensor_hub_raw_event(struct hid_device *hdev,
485482
callback->pdev);
486483
spin_unlock_irqrestore(&pdata->lock, flags);
487484

488-
err_report:
489485
return 1;
490486
}
491487

0 commit comments

Comments
 (0)