diff options
author | Colin Ian King <colin.king@canonical.com> | 2020-07-29 11:05:25 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-07-29 14:00:25 +0200 |
commit | 100a149ff153702f8fc7b005df7e9ea9aba5f79e (patch) | |
tree | 4291af984e2052dfeab3a2b4381f7ab6537baf7b /drivers/staging | |
parent | 7f921e92e72a52e6390207d3ebeb8f3b5966ebde (diff) | |
download | linux-100a149ff153702f8fc7b005df7e9ea9aba5f79e.tar.gz linux-100a149ff153702f8fc7b005df7e9ea9aba5f79e.tar.bz2 linux-100a149ff153702f8fc7b005df7e9ea9aba5f79e.zip |
staging: rtl8723bs: remove redundant assignment to variable ret
The variable ret is being assigned an error return value that is never
read, the control passes to a return statement and ret is never referenced.
Remove the redundant assignment. Also remove an empty line.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20200729100525.573500-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/rtl8723bs/os_dep/osdep_service.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/staging/rtl8723bs/os_dep/osdep_service.c b/drivers/staging/rtl8723bs/os_dep/osdep_service.c index 6d443197a0cf..f61ad9200960 100644 --- a/drivers/staging/rtl8723bs/os_dep/osdep_service.c +++ b/drivers/staging/rtl8723bs/os_dep/osdep_service.c @@ -146,10 +146,8 @@ int rtw_change_ifname(struct adapter *padapter, const char *ifname) rereg_priv->old_pnetdev = cur_pnetdev; pnetdev = rtw_init_netdev(padapter); - if (!pnetdev) { - ret = -1; + if (!pnetdev) goto error; - } SET_NETDEV_DEV(pnetdev, dvobj_to_dev(adapter_to_dvobj(padapter))); @@ -170,9 +168,7 @@ int rtw_change_ifname(struct adapter *padapter, const char *ifname) return 0; error: - return -1; - } void rtw_buf_free(u8 **buf, u32 *buf_len) |