diff options
author | Roel Kluin <12o3l@tiscali.nl> | 2008-04-17 00:16:24 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-05-02 13:25:53 -0400 |
commit | 87521c46f63f0e1cac2bf8af08942ac47bb25de5 (patch) | |
tree | 2b90f02af6ef108028f4ab1afa53a10bc3cc4ed1 /drivers/usb/serial | |
parent | 28ffd79c31a7bed6f610511a4d104d1255cd1d95 (diff) |
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: Roel Kluin <12o3l@tiscali.nl>
Cc: SL Baur <steve@xemacs.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/mos7840.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index 6bcb82d3911a..78f2f6db494d 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c | |||
@@ -1713,7 +1713,7 @@ static int mos7840_tiocmset(struct usb_serial_port *port, struct file *file, | |||
1713 | { | 1713 | { |
1714 | struct moschip_port *mos7840_port; | 1714 | struct moschip_port *mos7840_port; |
1715 | unsigned int mcr; | 1715 | unsigned int mcr; |
1716 | unsigned int status; | 1716 | int status; |
1717 | 1717 | ||
1718 | dbg("%s - port %d", __func__, port->number); | 1718 | dbg("%s - port %d", __func__, port->number); |
1719 | 1719 | ||
@@ -1740,11 +1740,10 @@ static int mos7840_tiocmset(struct usb_serial_port *port, struct file *file, | |||
1740 | 1740 | ||
1741 | mos7840_port->shadowMCR = mcr; | 1741 | mos7840_port->shadowMCR = mcr; |
1742 | 1742 | ||
1743 | status = 0; | ||
1744 | status = mos7840_set_uart_reg(port, MODEM_CONTROL_REGISTER, mcr); | 1743 | status = mos7840_set_uart_reg(port, MODEM_CONTROL_REGISTER, mcr); |
1745 | if (status < 0) { | 1744 | if (status < 0) { |
1746 | dbg("setting MODEM_CONTROL_REGISTER Failed\n"); | 1745 | dbg("setting MODEM_CONTROL_REGISTER Failed\n"); |
1747 | return -1; | 1746 | return status; |
1748 | } | 1747 | } |
1749 | 1748 | ||
1750 | return 0; | 1749 | return 0; |