Commit 925e277f authored by Wolfram Sang's avatar Wolfram Sang Committed by David S. Miller

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: default avatarWolfram Sang <w.sang@pengutronix.de>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 18a31e1e
...@@ -550,7 +550,7 @@ EXPORT_SYMBOL(irttp_close_tsap); ...@@ -550,7 +550,7 @@ EXPORT_SYMBOL(irttp_close_tsap);
*/ */
int irttp_udata_request(struct tsap_cb *self, struct sk_buff *skb) 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 != NULL, return -1;);
IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, 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) ...@@ -566,13 +566,14 @@ int irttp_udata_request(struct tsap_cb *self, struct sk_buff *skb)
/* Check that nothing bad happens */ /* Check that nothing bad happens */
if (!self->connected) { if (!self->connected) {
IRDA_DEBUG(1, "%s(), Not connected\n", __func__); IRDA_WARNING("%s(), Not connected\n", __func__);
ret = -ENOTCONN;
goto err; goto err;
} }
if (skb->len > self->max_seg_size) { if (skb->len > self->max_seg_size) {
IRDA_DEBUG(1, "%s(), UData is too large for IrLAP!\n", IRDA_ERROR("%s(), UData is too large for IrLAP!\n", __func__);
__func__); ret = -EMSGSIZE;
goto err; goto err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment