All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sensor-hub: Remove pointless NULL check
@ 2012-10-09 14:20 Alan Cox
  2012-10-18 18:58 ` Srinivas Pandruvada
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Cox @ 2012-10-09 14:20 UTC (permalink / raw)
  To: linux-input, srinivas.pandruvada

From: Alan Cox <alan@linux.intel.com>

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

Signed-off-by: Alan Cox <alan@linux.intel.com>
---

 drivers/hid/hid-sensor-hub.c |    4 ----
 1 file changed, 4 deletions(-)


diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c
index d9d73e9..4ff2497 100644
--- a/drivers/hid/hid-sensor-hub.c
+++ b/drivers/hid/hid-sensor-hub.c
@@ -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;
 }
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-18 18:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-09 14:20 [PATCH] sensor-hub: Remove pointless NULL check Alan Cox
2012-10-18 18:58 ` Srinivas Pandruvada

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.