Skip to contentSkip to conversation

sensor-hub: Remove pointless NULL check

PATCH RESEND New Alan Cox 1 participant 1 message Oct 25, 2012

Subsystems (2)
lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH RESEND 1/1 sensor-hub: Remove pointless NULL check

From: Alan Cox <[email protected]>

report cannot be NULL, fortunately as we use it before we check !

---

 drivers/hid/hid-sensor-hub.c |    4 ----
 1 file changed, 4 deletions(-)
drivers/hid/hid-sensor-hub.c +0 -4
index d9d73e9..4ff2497 100644
@@ -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;
 }