lkml.org 
[lkml]   [2020]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 3.16 51/99] staging: wlan-ng: ensure error return is actually returned
    3.16.84-rc1 review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Colin Ian King <colin.king@canonical.com>

    commit 4cc41cbce536876678b35e03c4a8a7bb72c78fa9 upstream.

    Currently when the call to prism2sta_ifst fails a netdev_err error
    is reported, error return variable result is set to -1 but the
    function always returns 0 for success. Fix this by returning
    the error value in variable result rather than 0.

    Addresses-Coverity: ("Unused value")
    Fixes: 00b3ed168508 ("Staging: add wlan-ng prism2 usb driver")
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Link: https://lore.kernel.org/r/20200114181604.390235-1-colin.king@canonical.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    ---
    drivers/staging/wlan-ng/prism2mgmt.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/staging/wlan-ng/prism2mgmt.c
    +++ b/drivers/staging/wlan-ng/prism2mgmt.c
    @@ -939,7 +939,7 @@ int prism2mgmt_flashdl_state(wlandevice_
    }
    }

    - return 0;
    + return result;
    }

    /*----------------------------------------------------------------
    \
     
     \ /
      Last update: 2020-05-20 16:28    [W:4.142 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site