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

Commit 52fa3832 authored by Perry Hung's avatar Perry Hung Committed by Greg Kroah-Hartman
Browse files

greybus: connection: silence warning on unbound protocols



If a protocol was not successfully created, we can't drop the refcount
on it. This might happen for example if the connection fails to bind a
protocol.

Silences a warning on cleanup.

Signed-off-by: default avatarPerry Hung <perry@leaflabs.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent e619e850
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -319,6 +319,7 @@ void gb_connection_destroy(struct gb_connection *connection)
	list_del(&connection->hd_links);
	spin_unlock_irq(&gb_connections_lock);

	if (connection->protocol)
		gb_protocol_put(connection->protocol);
	connection->protocol = NULL;

+0 −3
Original line number Diff line number Diff line
@@ -196,9 +196,6 @@ void gb_protocol_put(struct gb_protocol *protocol)
	u8 minor;
	u8 protocol_count;

	if (WARN_ON(!protocol))
		return;

	id = protocol->id;
	major = protocol->major;
	minor = protocol->minor;