summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/connection.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-08-31 17:21:11 +0530
committerJohan Hovold <johan@hovoldconsulting.com>2015-09-03 14:43:51 +0200
commit58f469a7da3c0b2e126851f850780de20182708b (patch)
tree7c814ee7788b894cdfb4b7623d7116929ee1c0e9 /drivers/staging/greybus/connection.c
parent3dca03de9db7c467811bdfcb0b3b90cb9a184a8f (diff)
downloadlinux-stable-58f469a7da3c0b2e126851f850780de20182708b.tar.gz
linux-stable-58f469a7da3c0b2e126851f850780de20182708b.tar.bz2
linux-stable-58f469a7da3c0b2e126851f850780de20182708b.zip
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>
Diffstat (limited to 'drivers/staging/greybus/connection.c')
-rw-r--r--drivers/staging/greybus/connection.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c
index f89b199230dc..557fe6d6b7af 100644
--- a/drivers/staging/greybus/connection.c
+++ b/drivers/staging/greybus/connection.c
@@ -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.