lkml.org 
[lkml]   [2019]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] i2400m/USB: fix error return when rx_size is too large
From
From: Colin King <colin.king@canonical.com>
Date: Mon, 2 Dec 2019 17:42:46 +0000

> 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>

This leaks rx_skb, the caller is supposed to clean up rx_skb
by freeing it if this function doesn't transmit it successfully.

\
 
 \ /
  Last update: 2019-12-02 22:14    [W:0.040 / U:3.176 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site