[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4a709b250542c3af2783955f53f1e980b010082a.1438678566.git.skarajga@visteon.com>
Date: Tue, 4 Aug 2015 09:11:05 +0000
From: "Karajgaonkar, Saurabh (S.)" <skarajga@...teon.com>
To: "srinivas.kandagatla@...il.com" <srinivas.kandagatla@...il.com>,
"maxime.coquelin@...com" <maxime.coquelin@...com>,
"patrice.chotard@...com" <patrice.chotard@...com>,
"stern@...land.harvard.edu" <stern@...land.harvard.edu>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"mathias.nyman@...el.com" <mathias.nyman@...el.com>,
"balbi@...com" <balbi@...com>,
"johan@...nel.org" <johan@...nel.org>,
"sergei.shtylyov@...entembedded.com"
<sergei.shtylyov@...entembedded.com>,
"Julia.Lawall@...6.fr" <Julia.Lawall@...6.fr>,
"khilman@...aro.org" <khilman@...aro.org>,
"rafael.j.wysocki@...el.com" <rafael.j.wysocki@...el.com>,
"pmladek@...e.cz" <pmladek@...e.cz>,
"wsa@...-dreams.de" <wsa@...-dreams.de>
CC: "linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"kernel@...inux.com" <kernel@...inux.com>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH 6/9] usb: host: u132-hcd: Simplify return statement
From: Saurabh Karajgaonkar <skarajga@...teon.com>
Replace redundant variable use in return statement.
Signed-off-by: Saurabh Karajgaonkar <skarajga@...teon.com>
---
drivers/usb/host/u132-hcd.c | 27 +++++----------------------
1 file changed, 5 insertions(+), 22 deletions(-)
diff --git a/drivers/usb/host/u132-hcd.c b/drivers/usb/host/u132-hcd.c
index d516877..1cfb811 100644
--- a/drivers/usb/host/u132-hcd.c
+++ b/drivers/usb/host/u132-hcd.c
@@ -1542,11 +1542,8 @@ static int u132_periodic_reinit(struct u132 *u132)
(fit ^ FIT) | u132->hc_fminterval);
if (retval)
return retval;
- retval = u132_write_pcimem(u132, periodicstart,
+ return u132_write_pcimem(u132, periodicstart,
((9 * fi) / 10) & 0x3fff);
- if (retval)
- return retval;
- return 0;
}
static char *hcfs2string(int state)
@@ -2701,28 +2698,18 @@ static int u132_roothub_setportfeature(struct u132 *u132, u16 wValue,
if (wIndex == 0 || wIndex > u132->num_ports) {
return -EINVAL;
} else {
- int retval;
int port_index = wIndex - 1;
struct u132_port *port = &u132->port[port_index];
port->Status &= ~(1 << wValue);
switch (wValue) {
case USB_PORT_FEAT_SUSPEND:
- retval = u132_write_pcimem(u132,
+ return u132_write_pcimem(u132,
roothub.portstatus[port_index], RH_PS_PSS);
- if (retval)
- return retval;
- return 0;
case USB_PORT_FEAT_POWER:
- retval = u132_write_pcimem(u132,
+ return u132_write_pcimem(u132,
roothub.portstatus[port_index], RH_PS_PPS);
- if (retval)
- return retval;
- return 0;
case USB_PORT_FEAT_RESET:
- retval = u132_roothub_portreset(u132, port_index);
- if (retval)
- return retval;
- return 0;
+ return u132_roothub_portreset(u132, port_index);
default:
return -EPIPE;
}
@@ -2737,7 +2724,6 @@ static int u132_roothub_clearportfeature(struct u132 *u132, u16 wValue,
} else {
int port_index = wIndex - 1;
u32 temp;
- int retval;
struct u132_port *port = &u132->port[port_index];
port->Status &= ~(1 << wValue);
switch (wValue) {
@@ -2773,11 +2759,8 @@ static int u132_roothub_clearportfeature(struct u132 *u132, u16 wValue,
default:
return -EPIPE;
}
- retval = u132_write_pcimem(u132, roothub.portstatus[port_index],
+ return u132_write_pcimem(u132, roothub.portstatus[port_index],
temp);
- if (retval)
- return retval;
- return 0;
}
}
--
1.9.1
--
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