Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 21dcc9e5 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

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: default avatarJohan Hovold <johan@hovoldconsulting.com>
Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent e6c88bf3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}