[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1445110125-2916-1-git-send-email-peter.senna@gmail.com>
Date: Sat, 17 Oct 2015 21:28:45 +0200
From: Peter Senna Tschudin <peter.senna@...il.com>
To: gregkh@...uxfoundation.org, sergei.shtylyov@...entembedded.com,
jkosina@...e.cz, rdunlap@...radead.org, balbi@...com,
standby24x7@...il.com, chris@...vick.com,
stern@...land.harvard.edu, john453@...aday-tech.com,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
joe@...ches.com
Cc: Peter Senna Tschudin <peter.senna@...il.com>
Subject: [PATCH 3/9 V2] usb/host/fotg210: Remove return statement inside if
This patch make changes to an if else statement which simplifies the code
allowing to remove a return.
CC: Joe Perches <joe@...ches.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@...il.com>
---
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists