aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-06-15 18:44:13 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-12 19:34:35 -0400
commit23189aee76c3297c7ff797ca8bc8e314783039ef (patch)
tree83463bf5a471ccf40f3de9455614139f5588f872 /drivers/usb/serial
parent95b934548049e2fd6a67853c6b5055c073bf6961 (diff)
USB: serial: keyspan_pda: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: <linux-usb-devel@lists.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/keyspan_pda.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c
index dd0b66a6ed5d..be9ac20a8f10 100644
--- a/drivers/usb/serial/keyspan_pda.c
+++ b/drivers/usb/serial/keyspan_pda.c
@@ -218,11 +218,12 @@ static void keyspan_pda_rx_interrupt (struct urb *urb)
218 struct tty_struct *tty = port->tty; 218 struct tty_struct *tty = port->tty;
219 unsigned char *data = urb->transfer_buffer; 219 unsigned char *data = urb->transfer_buffer;
220 int i; 220 int i;
221 int status; 221 int retval;
222 int status = urb->status;
222 struct keyspan_pda_private *priv; 223 struct keyspan_pda_private *priv;
223 priv = usb_get_serial_port_data(port); 224 priv = usb_get_serial_port_data(port);
224 225
225 switch (urb->status) { 226 switch (status) {
226 case 0: 227 case 0:
227 /* success */ 228 /* success */
228 break; 229 break;
@@ -230,10 +231,12 @@ static void keyspan_pda_rx_interrupt (struct urb *urb)
230 case -ENOENT: 231 case -ENOENT:
231 case -ESHUTDOWN: 232 case -ESHUTDOWN:
232 /* this urb is terminated, clean up */ 233 /* this urb is terminated, clean up */
233 dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status); 234 dbg("%s - urb shutting down with status: %d",
235 __FUNCTION__, status);
234 return; 236 return;
235 default: 237 default:
236 dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status); 238 dbg("%s - nonzero urb status received: %d",
239 __FUNCTION__, status);
237 goto exit; 240 goto exit;
238 } 241 }
239 242
@@ -268,10 +271,10 @@ static void keyspan_pda_rx_interrupt (struct urb *urb)
268 } 271 }
269 272
270exit: 273exit:
271 status = usb_submit_urb (urb, GFP_ATOMIC); 274 retval = usb_submit_urb (urb, GFP_ATOMIC);
272 if (status) 275 if (retval)
273 err ("%s - usb_submit_urb failed with result %d", 276 err ("%s - usb_submit_urb failed with result %d",
274 __FUNCTION__, status); 277 __FUNCTION__, retval);
275} 278}
276 279
277 280