From 58f469a7da3c0b2e126851f850780de20182708b Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Mon, 31 Aug 2015 17:21:11 +0530 Subject: [PATCH] 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 Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Johan Hovold --- drivers/staging/greybus/connection.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index f89b199..557fe6d 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. -- 2.7.4