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