From: Roel Kluin <12o3l@tiscali.nl>
To: Greg KH <greg@kroah.com>,
linux-usb@vger.kernel.org, lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH] mos7840: test and propagate set_uart_reg return value
Date: Thu, 17 Apr 2008 06:16:24 +0200 [thread overview]
Message-ID: <4806CF18.2050403@tiscali.nl> (raw)
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>
---
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index aeeb9cb..ef1ede2 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,
{
struct moschip_port *mos7840_port;
unsigned int mcr;
- unsigned int status;
+ int status;
dbg("%s - port %d", __FUNCTION__, port->number);
@@ -1739,11 +1739,10 @@ static int mos7840_tiocmset(struct usb_serial_port *port, struct file *file,
mos7840_port->shadowMCR = mcr;
- status = 0;
status = mos7840_set_uart_reg(port, MODEM_CONTROL_REGISTER, mcr);
if (status < 0) {
dbg("setting MODEM_CONTROL_REGISTER Failed\n");
- return -1;
+ return status;
}
return 0;
next reply other threads:[~2008-04-17 4:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-17 4:16 Roel Kluin [this message]
2008-04-17 6:58 ` [PATCH] mos7840: test and propagate set_uart_reg return value SL Baur
2008-04-28 23:53 ` patch usb-mos7840-test-and-propagate-set_uart_reg-return-value.patch added to gregkh-2.6 tree gregkh
2008-04-29 6:31 ` SL Baur
2008-04-29 6:51 ` Greg KH
2008-04-29 7:33 ` SL Baur
2008-04-30 6:03 ` Greg KH
2008-05-01 1:56 ` SL Baur
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4806CF18.2050403@tiscali.nl \
--to=12o3l@tiscali.nl \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.