[PATCH -next] staging: greybus: simplify the return expression of gb_svc_add()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Simplify the return expression.

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

_______________________________________________
greybus-dev mailing list
greybus-dev@xxxxxxxxxxxxxxxx
https://lists.linaro.org/mailman/listinfo/greybus-dev




[Index of Archives]     [Asterisk App Development]     [PJ SIP]     [Gnu Gatekeeper]     [IETF Sipping]     [Info Cyrus]     [ALSA User]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite News]     [Deep Creek Hot Springs]     [Yosemite Campsites]     [ISDN Cause Codes]     [Asterisk Books]

  Powered by Linux