Commit 58f469a7 authored by Viresh Kumar's avatar Viresh Kumar Committed by Johan Hovold

greybus: connection: no need to verify connection->protocol

connection->protocol will always be valid in gb_connection_init() as it
is called only from a single routine, after initializing the 'protocol'
field.

No need to check it again.
Reviewed-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
parent 3dca03de
......@@ -371,11 +371,6 @@ static int gb_connection_init(struct gb_connection *connection)
int cport_id = connection->intf_cport_id;
int ret;
if (!connection->protocol) {
dev_warn(&connection->dev, "init without protocol.\n");
return 0;
}
/*
* Inform Interface about Active CPorts. We don't need to do this
* operation for control cport.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment