Commit 8602b08a authored by Saurabh Karajgaonkar's avatar Saurabh Karajgaonkar Committed by Greg Kroah-Hartman

usb: host: u132-hcd: Simplify return statement

Replace redundant variable use in return statement.
Signed-off-by: default avatarSaurabh Karajgaonkar <skarajga@visteon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent aa31a090
...@@ -1542,11 +1542,8 @@ static int u132_periodic_reinit(struct u132 *u132) ...@@ -1542,11 +1542,8 @@ static int u132_periodic_reinit(struct u132 *u132)
(fit ^ FIT) | u132->hc_fminterval); (fit ^ FIT) | u132->hc_fminterval);
if (retval) if (retval)
return retval; return retval;
retval = u132_write_pcimem(u132, periodicstart, return u132_write_pcimem(u132, periodicstart,
((9 * fi) / 10) & 0x3fff); ((9 * fi) / 10) & 0x3fff);
if (retval)
return retval;
return 0;
} }
static char *hcfs2string(int state) static char *hcfs2string(int state)
...@@ -2701,28 +2698,18 @@ static int u132_roothub_setportfeature(struct u132 *u132, u16 wValue, ...@@ -2701,28 +2698,18 @@ static int u132_roothub_setportfeature(struct u132 *u132, u16 wValue,
if (wIndex == 0 || wIndex > u132->num_ports) { if (wIndex == 0 || wIndex > u132->num_ports) {
return -EINVAL; return -EINVAL;
} else { } else {
int retval;
int port_index = wIndex - 1; int port_index = wIndex - 1;
struct u132_port *port = &u132->port[port_index]; struct u132_port *port = &u132->port[port_index];
port->Status &= ~(1 << wValue); port->Status &= ~(1 << wValue);
switch (wValue) { switch (wValue) {
case USB_PORT_FEAT_SUSPEND: case USB_PORT_FEAT_SUSPEND:
retval = u132_write_pcimem(u132, return u132_write_pcimem(u132,
roothub.portstatus[port_index], RH_PS_PSS); roothub.portstatus[port_index], RH_PS_PSS);
if (retval)
return retval;
return 0;
case USB_PORT_FEAT_POWER: case USB_PORT_FEAT_POWER:
retval = u132_write_pcimem(u132, return u132_write_pcimem(u132,
roothub.portstatus[port_index], RH_PS_PPS); roothub.portstatus[port_index], RH_PS_PPS);
if (retval)
return retval;
return 0;
case USB_PORT_FEAT_RESET: case USB_PORT_FEAT_RESET:
retval = u132_roothub_portreset(u132, port_index); return u132_roothub_portreset(u132, port_index);
if (retval)
return retval;
return 0;
default: default:
return -EPIPE; return -EPIPE;
} }
...@@ -2737,7 +2724,6 @@ static int u132_roothub_clearportfeature(struct u132 *u132, u16 wValue, ...@@ -2737,7 +2724,6 @@ static int u132_roothub_clearportfeature(struct u132 *u132, u16 wValue,
} else { } else {
int port_index = wIndex - 1; int port_index = wIndex - 1;
u32 temp; u32 temp;
int retval;
struct u132_port *port = &u132->port[port_index]; struct u132_port *port = &u132->port[port_index];
port->Status &= ~(1 << wValue); port->Status &= ~(1 << wValue);
switch (wValue) { switch (wValue) {
...@@ -2773,11 +2759,8 @@ static int u132_roothub_clearportfeature(struct u132 *u132, u16 wValue, ...@@ -2773,11 +2759,8 @@ static int u132_roothub_clearportfeature(struct u132 *u132, u16 wValue,
default: default:
return -EPIPE; return -EPIPE;
} }
retval = u132_write_pcimem(u132, roothub.portstatus[port_index], return u132_write_pcimem(u132, roothub.portstatus[port_index],
temp); temp);
if (retval)
return retval;
return 0;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment