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: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
This commit is contained in:
Viresh Kumar 2015-08-31 17:21:11 +05:30 committed by Johan Hovold
parent 3dca03de9d
commit 58f469a7da
1 changed files with 0 additions and 5 deletions

View File

@ -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.