Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2626593pxk; Mon, 14 Sep 2020 20:06:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKjviIHC+dM5A9/Ose3jO7D9JnC0TjobMd+UPXyuN/5MqvAjXWk9kkbezub+LnEWwX5uY5 X-Received: by 2002:a17:906:370a:: with SMTP id d10mr18717749ejc.393.1600139166677; Mon, 14 Sep 2020 20:06:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600139166; cv=none; d=google.com; s=arc-20160816; b=OpZfgpfB3JpEZwySTAR4q34BB4GLxUlYEkju/xME+XRuZuIQJ37qMtGpxKbnZ7TQ5z i+O1WN1xre4Y+gcUF54hCamEcngoRdc5HO8/lV1EVf7IH7omQzRTFnhOsugO11RL9327 xaqnXVX9miPhA+z1i7jAT+HVGSKhrAxOBtm9R4+nBoxLFaghs2or2XZi1Q3mjxoqFTtt +vEqM6zGJuWoeydoVATKNl4P4bQF++kVRnxwBTQuu2MNmjBzjly0kB+NqTGH92P7EDUQ LKXStHyrwSqTvKSkGV0mQv/roqYjK84QgH9EN9tMakEUE/QwhkD8PUvfPMLEFkbJ90/F jdDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=yCFlk/1lFwm8K74y0ZOo51cNqiaZbXDb0X3cp6/DKFQ=; b=vbn6fE40gmweRDR72wEd9NxjHXXV+k+sgiDFNyS/yR5j0XV9Wrvue0QSYQ8wHQHhsV +5DgsGCjR78KKEcioz0HrF7+HGbA6bCjFVLX+RCAZ4afvCUADlJdnpZQnkXlTAzxI2yT 9hEx/hwuN/S2/Uz9sf6I/fJqm7QxryKXMV5oVF7lzl9DxqeNDIbdLfTmdSf6IUGT7Pdv 2SLnG8dNcYGpiDw8gC+VV+Jvd66G0ROqbBhnytwKXQRrD0Yl5ojr4FaNMG7p5I9m0fok DkwwwkjkdORZ1GogfBolXEtuvQyA1yyiQ0SSo+tNG/CmrBYMeGk/4sRF3fCj3KwiZeYz 4PjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u2si8044964ejx.507.2020.09.14.20.05.44; Mon, 14 Sep 2020 20:06:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726189AbgIODEY (ORCPT + 99 others); Mon, 14 Sep 2020 23:04:24 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:40238 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726135AbgIODEE (ORCPT ); Mon, 14 Sep 2020 23:04:04 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 04C4FDE06A4004652D42; Tue, 15 Sep 2020 11:04:03 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Tue, 15 Sep 2020 11:03:52 +0800 From: Liu Shixin To: Greg Kroah-Hartman , Johan Hovold , Alex Elder CC: , , Liu Shixin Subject: [PATCH -next] staging: greybus: simplify the return expression of gb_svc_add() Date: Tue, 15 Sep 2020 11:26:30 +0800 Message-ID: <20200915032630.1772621-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.32] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify the return expression. Signed-off-by: Liu Shixin --- drivers/greybus/svc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/greybus/svc.c b/drivers/greybus/svc.c index ce7740ef449b..dca251172cd2 100644 --- a/drivers/greybus/svc.c +++ b/drivers/greybus/svc.c @@ -1345,18 +1345,12 @@ struct gb_svc *gb_svc_create(struct gb_host_device *hd) int gb_svc_add(struct gb_svc *svc) { - int ret; - /* * The SVC protocol is currently driven by the SVC, so the SVC device * is added from the connection request handler when enough * information has been received. */ - ret = gb_connection_enable(svc->connection); - if (ret) - return ret; - - return 0; + return gb_connection_enable(svc->connection); } static void gb_svc_remove_modules(struct gb_svc *svc) -- 2.25.1