public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] staging: greybus: simplify the return expression of gb_svc_add()
@ 2020-09-15  3:26 Liu Shixin
  2020-09-15  9:39 ` Johan Hovold
  0 siblings, 1 reply; 2+ messages in thread
From: Liu Shixin @ 2020-09-15  3:26 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Johan Hovold, Alex Elder
  Cc: greybus-dev, linux-kernel, Liu Shixin

Simplify the return expression.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-15  9:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-15  3:26 [PATCH -next] staging: greybus: simplify the return expression of gb_svc_add() Liu Shixin
2020-09-15  9:39 ` Johan Hovold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox