提交 21dcc9e5 编写于 作者: J Johan Hovold 提交者: Greg Kroah-Hartman

greybus: connection: fix potential null-deref in hd_cport_enable

Use parent of host device for error messages as the connections bundle
may be NULL.
Signed-off-by: NJohan Hovold <johan@hovoldconsulting.com>
Reviewed-by: NViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
上级 e6c88bf3
......@@ -196,7 +196,7 @@ static int gb_connection_hd_cport_enable(struct gb_connection *connection)
ret = hd->driver->cport_enable(hd, connection->hd_cport_id);
if (ret) {
dev_err(&connection->bundle->dev,
dev_err(hd->parent,
"failed to enable host cport: %d\n", ret);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册