提交 eb76b37a 编写于 作者: C Colin Ian King 提交者: Greg Kroah-Hartman

usb: typec: mux: remove redundant check on variable match

All the code paths that lead to the return statement are where
match is always true, hence the check to see if it is true is
redundant and can be removed.

Detected by CoverityScan, CID#14769672 ("Logically dead code")
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Acked-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 98bba546
......@@ -184,7 +184,7 @@ static void *typec_mux_match(struct device_connection *con, int ep, void *data)
if (dev_fwnode(mux->dev) == con->fwnode)
return mux;
return match ? ERR_PTR(-EPROBE_DEFER) : NULL;
return ERR_PTR(-EPROBE_DEFER);
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册