Commit 87521c46 authored by Roel Kluin's avatar Roel Kluin Committed by Greg Kroah-Hartman

USB: mos7840: test and propagate set_uart_reg return value

The test for an mos7840_set_uart_reg() error return value only works when
status is signed. propagate its error value.
Signed-off-by: default avatarRoel Kluin <12o3l@tiscali.nl>
Cc: SL Baur <steve@xemacs.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 28ffd79c
...@@ -1713,7 +1713,7 @@ static int mos7840_tiocmset(struct usb_serial_port *port, struct file *file, ...@@ -1713,7 +1713,7 @@ static int mos7840_tiocmset(struct usb_serial_port *port, struct file *file,
{ {
struct moschip_port *mos7840_port; struct moschip_port *mos7840_port;
unsigned int mcr; unsigned int mcr;
unsigned int status; int status;
dbg("%s - port %d", __func__, port->number); dbg("%s - port %d", __func__, port->number);
...@@ -1740,11 +1740,10 @@ static int mos7840_tiocmset(struct usb_serial_port *port, struct file *file, ...@@ -1740,11 +1740,10 @@ static int mos7840_tiocmset(struct usb_serial_port *port, struct file *file,
mos7840_port->shadowMCR = mcr; mos7840_port->shadowMCR = mcr;
status = 0;
status = mos7840_set_uart_reg(port, MODEM_CONTROL_REGISTER, mcr); status = mos7840_set_uart_reg(port, MODEM_CONTROL_REGISTER, mcr);
if (status < 0) { if (status < 0) {
dbg("setting MODEM_CONTROL_REGISTER Failed\n"); dbg("setting MODEM_CONTROL_REGISTER Failed\n");
return -1; return status;
} }
return 0; 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