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

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

greybus: connection: fix potential null-deref in connection create



We allow connections without bundles so we must not use the bundle
device for error messages after binding the protocol.

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 21dcc9e5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -170,7 +170,7 @@ gb_connection_create_range(struct greybus_host_device *hd,

	retval = gb_connection_bind_protocol(connection);
	if (retval) {
		dev_err(&bundle->dev, "%d: failed to bind protocol: %d\n",
		dev_err(parent, "%d: failed to bind protocol: %d\n",
			cport_id, retval);
		gb_connection_destroy(connection);
		return NULL;