aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-transaction.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2007-01-26 00:38:34 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-03-09 16:02:47 -0500
commite5f49c3b837ff90c8aec2c6c66c4966080aced06 (patch)
tree16f6cb30602b9e63b9dc3a0a4ef8b56dcaf10346 /drivers/firewire/fw-transaction.c
parent93c4cceb963ebb133531e5e3f4f6e2da0d222656 (diff)
firewire: Sanitize send error codes.
Drop the negative errnos and use RCODEs for all error codes in the complete transaction callback. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-transaction.c')
-rw-r--r--drivers/firewire/fw-transaction.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/firewire/fw-transaction.c b/drivers/firewire/fw-transaction.c
index 780ed2b44983..8387c8ea6735 100644
--- a/drivers/firewire/fw-transaction.c
+++ b/drivers/firewire/fw-transaction.c
@@ -93,15 +93,15 @@ transmit_complete_callback(struct fw_packet *packet,
93 close_transaction(t, card, RCODE_BUSY, NULL, 0); 93 close_transaction(t, card, RCODE_BUSY, NULL, 0);
94 break; 94 break;
95 case ACK_DATA_ERROR: 95 case ACK_DATA_ERROR:
96 close_transaction(t, card, RCODE_DATA_ERROR, NULL, 0);
97 break;
96 case ACK_TYPE_ERROR: 98 case ACK_TYPE_ERROR:
97 close_transaction(t, card, RCODE_SEND_ERROR, NULL, 0); 99 close_transaction(t, card, RCODE_TYPE_ERROR, NULL, 0);
98 break; 100 break;
99 default: 101 default:
100 /* FIXME: In this case, status is a negative errno, 102 /* In this case the ack is really a juju specific
101 * corresponding to an OHCI specific transmit error 103 * rcode, so just forward that to the callback. */
102 * code. We should map that to an RCODE instead of 104 close_transaction(t, card, status, NULL, 0);
103 * just the generic RCODE_SEND_ERROR. */
104 close_transaction(t, card, RCODE_SEND_ERROR, NULL, 0);
105 break; 105 break;
106 } 106 }
107} 107}