diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-03-17 01:26:57 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-03-18 09:06:16 +0300 |
commit | dedf215bd1c7e095e98528af57dc6aedee13db3b (patch) | |
tree | 024d895396b7c1f843187a612572d6d5bdadb785 /drivers | |
parent | d5469036124d0e3a644f6e00b64f0033d9429bfe (diff) | |
download | linux-dedf215bd1c7e095e98528af57dc6aedee13db3b.tar.xz |
staging: rtl8723bs: remove unused code
There are two final hunks of code that are only built
if SDIO_DYNAMIC_ALLOC_MEM is defined however this is never
defined and if it was the code would lead to dereferencing
an uninitialized pointer oldmem. It appears that a previous
commit 1babeb0c3e59 ("Staging: rtl8723bs: Remove dead code")
removed some of the dead code but not all of it. Clean this
up by removing the final hunks.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/rtl8723bs/hal/sdio_ops.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c index 3fee34484577..92191e9789bb 100644 --- a/drivers/staging/rtl8723bs/hal/sdio_ops.c +++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c @@ -428,9 +428,6 @@ static u32 sdio_read_port( PSDIO_DATA psdio; struct hal_com_data *hal; u32 oldcnt; -#ifdef SDIO_DYNAMIC_ALLOC_MEM - u8 *oldmem; -#endif s32 err; @@ -447,13 +444,6 @@ static u32 sdio_read_port( err = _sd_read(intfhdl, addr, cnt, mem); -#ifdef SDIO_DYNAMIC_ALLOC_MEM - if ((oldcnt != cnt) && (oldmem)) { - memcpy(oldmem, mem, oldcnt); - kfree(mem); - } -#endif - if (err) return _FAIL; return _SUCCESS; |