提交 3a11c0e1 编写于 作者: C Colin Ian King 提交者: Dmitry Torokhov

Input: synaptics-rmi4 - remove redundant null check on rmi_dev

rmi_dev is currently being dereferenced before it null checked, however,
after deeper inspecting, rmi_dev can never be null, so just remove this
redundant check.

Fixes CoverityScan CID 1391218 ("Dereference before null check")
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 0c54fe74
...@@ -175,9 +175,6 @@ static int rmi_f03_attention(struct rmi_function *fn, unsigned long *irq_bits) ...@@ -175,9 +175,6 @@ static int rmi_f03_attention(struct rmi_function *fn, unsigned long *irq_bits)
int i; int i;
int error; int error;
if (!rmi_dev)
return -ENODEV;
if (drvdata->attn_data.data) { if (drvdata->attn_data.data) {
/* First grab the data passed by the transport device */ /* First grab the data passed by the transport device */
if (drvdata->attn_data.size < ob_len) { if (drvdata->attn_data.size < ob_len) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册