From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751667AbbJQTaG (ORCPT ); Sat, 17 Oct 2015 15:30:06 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:38242 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750950AbbJQTaD (ORCPT ); Sat, 17 Oct 2015 15:30:03 -0400 From: Peter Senna Tschudin To: gregkh@linuxfoundation.org, sergei.shtylyov@cogentembedded.com, jkosina@suse.cz, rdunlap@infradead.org, balbi@ti.com, standby24x7@gmail.com, chris@rorvick.com, stern@rowland.harvard.edu, john453@faraday-tech.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, joe@perches.com Cc: Peter Senna Tschudin Subject: [PATCH 3/9 V2] usb/host/fotg210: Remove return statement inside if Date: Sat, 17 Oct 2015 21:28:45 +0200 Message-Id: <1445110125-2916-1-git-send-email-peter.senna@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1444687617.9184.4.camel@perches.com> References: <1444687617.9184.4.camel@perches.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch make changes to an if else statement which simplifies the code allowing to remove a return. CC: Joe Perches Signed-off-by: Peter Senna Tschudin --- Subject was: [PATCH 3/9] usb/host/fotg210: Remove useless else statement To be applied on top of V1. Changes from V1: Instead of just removing the else statement, remove the return inside the if statement so the code is even more readable. drivers/usb/host/fotg210-hcd.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c index 7f6aa99..064cd85 100644 --- a/drivers/usb/host/fotg210-hcd.c +++ b/drivers/usb/host/fotg210-hcd.c @@ -1396,15 +1396,13 @@ static int check_reset_complete(struct fotg210_hcd *fotg210, int index, return port_status; /* if reset finished and it's still not enabled -- handoff */ - if (!(port_status & PORT_PE)) { + if (!(port_status & PORT_PE)) /* with integrated TT, there's nobody to hand it to! */ - fotg210_dbg(fotg210, - "Failed to enable port %d on root hub TT\n", + fotg210_dbg(fotg210, "Failed to enable port %d on root hub TT\n", + index + 1); + else + fotg210_dbg(fotg210, "port %d reset complete, port enabled\n", index + 1); - return port_status; - } - fotg210_dbg(fotg210, "port %d reset complete, port enabled\n", - index + 1); return port_status; } -- 2.1.0