From: Viresh Kumar Date: Mon, 31 Aug 2015 11:51:11 +0000 (+0530) Subject: greybus: connection: no need to verify connection->protocol X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=58f469a7da3c0b2e126851f850780de20182708b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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.