]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Staging: rtl8723bs: Remove dead code
authorShreeya Patel <shreeya.patel23498@gmail.com>
Wed, 24 Jan 2018 00:11:07 +0000 (05:41 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2018 12:34:04 +0000 (13:34 +0100)
"oldmem==NULL;"
The above bug under the ifdef code would have caused a GCC
warning if it were ever compiled. Hence, remove the dead ifdefed
code from the file.

Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/sdio_ops.c

index 997ebc02bcb702266ae38daafd06e63b2b191e1c..cc519697450fb40d97a32a3f268c4d40c718d2ed 100644 (file)
@@ -453,21 +453,6 @@ static u32 sdio_read_port(
                cnt = _RND(cnt, psdio->block_transfer_len);
 /*     cnt = sdio_align_size(cnt); */
 
-       if (oldcnt != cnt) {
-#ifdef SDIO_DYNAMIC_ALLOC_MEM
-               oldmem = mem;
-               mem = rtw_malloc(cnt);
-               if (mem == NULL) {
-                       DBG_8192C(KERN_WARNING "%s: allocate memory %d bytes fail!\n", __func__, cnt);
-                       mem = oldmem;
-                       oldmem == NULL;
-               }
-#else
-               /*  in this case, caller should gurante the buffer is big enough */
-               /*  to receive data after alignment */
-#endif
-       }
-
        err = _sd_read(intfhdl, addr, cnt, mem);
 
 #ifdef SDIO_DYNAMIC_ALLOC_MEM