lkml.org 
[lkml]   [2019]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] i2400m/USB: fix error return when rx_size is too large
Date
From: Colin Ian King <colin.king@canonical.com>

Currently when the rx_size is too large the intended error
-EINVAL is not being returned as this is being assigned to
result rather than rx_skb. Fix this be setting rx_skb
to ERR_PTR(-EINVAL) so that the error is returned in rx_skb
as originally intended.

Addresses-Coverity: ("Unused value")
Fixes: a8ebf98f5414 ("i2400m/USB: TX and RX path backends")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/wimax/i2400m/usb-rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wimax/i2400m/usb-rx.c b/drivers/net/wimax/i2400m/usb-rx.c
index 5b64bda7d9e7..1a5e2178bb27 100644
--- a/drivers/net/wimax/i2400m/usb-rx.c
+++ b/drivers/net/wimax/i2400m/usb-rx.c
@@ -256,7 +256,7 @@ struct sk_buff *i2400mu_rx(struct i2400mu *i2400mu, struct sk_buff *rx_skb)
i2400mu->rx_size = rx_size;
else if (printk_ratelimit()) {
dev_err(dev, "BUG? rx_size up to %d\n", rx_size);
- result = -EINVAL;
+ rx_skb = ERR_PTR(-EINVAL);
goto out;
}
skb_put(rx_skb, read_size);
--
2.24.0
\
 
 \ /
  Last update: 2019-12-02 18:43    [W:0.042 / U:43.416 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site