diff options
author | Wolfram Sang <w.sang@pengutronix.de> | 2010-11-16 10:40:02 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-18 21:24:25 +0100 |
commit | 925e277f5221defdc53cbef1ac3ed1803fa32357 (patch) | |
tree | 5d11dc5bf2e6ca2ef848a3722c9270e59e4def67 /net/irda | |
parent | ipv6: Expose reachable and retrans timer values as msecs (diff) | |
download | linux-925e277f5221defdc53cbef1ac3ed1803fa32357.tar.xz linux-925e277f5221defdc53cbef1ac3ed1803fa32357.zip |
net: irda: irttp: sync error paths of data- and udata-requests
irttp_data_request() returns meaningful errorcodes, while irttp_udata_request()
just returns -1 in similar situations. Sync the two and the loglevels of the
accompanying output.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda')
-rw-r--r-- | net/irda/irttp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/irda/irttp.c b/net/irda/irttp.c index 6cfaeaf2a370..f6054f9ccbe3 100644 --- a/net/irda/irttp.c +++ b/net/irda/irttp.c @@ -550,7 +550,7 @@ EXPORT_SYMBOL(irttp_close_tsap); */ int irttp_udata_request(struct tsap_cb *self, struct sk_buff *skb) { - int ret = -1; + int ret; IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); @@ -566,13 +566,14 @@ int irttp_udata_request(struct tsap_cb *self, struct sk_buff *skb) /* Check that nothing bad happens */ if (!self->connected) { - IRDA_DEBUG(1, "%s(), Not connected\n", __func__); + IRDA_WARNING("%s(), Not connected\n", __func__); + ret = -ENOTCONN; goto err; } if (skb->len > self->max_seg_size) { - IRDA_DEBUG(1, "%s(), UData is too large for IrLAP!\n", - __func__); + IRDA_ERROR("%s(), UData is too large for IrLAP!\n", __func__); + ret = -EMSGSIZE; goto err; } |