提交 e3bbe875 编写于 作者: A Alan Cox 提交者: Jiri Kosina

HID: sensor-hub: Remove pointless NULL check

report cannot be NULL, fortunately as we use it before we check !
Signed-off-by: NAlan Cox <alan@linux.intel.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 d339f61d
...@@ -437,9 +437,6 @@ static int sensor_hub_raw_event(struct hid_device *hdev, ...@@ -437,9 +437,6 @@ static int sensor_hub_raw_event(struct hid_device *hdev,
ptr = raw_data; ptr = raw_data;
ptr++; /*Skip report id*/ ptr++; /*Skip report id*/
if (!report)
goto err_report;
spin_lock_irqsave(&pdata->lock, flags); spin_lock_irqsave(&pdata->lock, flags);
for (i = 0; i < report->maxfield; ++i) { for (i = 0; i < report->maxfield; ++i) {
...@@ -485,7 +482,6 @@ static int sensor_hub_raw_event(struct hid_device *hdev, ...@@ -485,7 +482,6 @@ static int sensor_hub_raw_event(struct hid_device *hdev,
callback->pdev); callback->pdev);
spin_unlock_irqrestore(&pdata->lock, flags); spin_unlock_irqrestore(&pdata->lock, flags);
err_report:
return 1; return 1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册