Commit 0256b540 authored by Abdul Hussain's avatar Abdul Hussain Committed by Greg Kroah-Hartman

Staging: wilc1000: NULL check before some freeing functions is not needed

This patch removes check before freeing the memory
since kfree(NULL) is safe
Signed-off-by: default avatarAbdul Hussain <habdul@visteon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 61500fbd
...@@ -214,7 +214,6 @@ int linux_spi_write(uint8_t *b, uint32_t len) ...@@ -214,7 +214,6 @@ int linux_spi_write(uint8_t *b, uint32_t len)
PRINT_ER("SPI transaction failed\n"); PRINT_ER("SPI transaction failed\n");
} }
} }
if (r_buffer)
kfree(r_buffer); kfree(r_buffer);
} else { } else {
PRINT_ER("can't write data with the following length: %d\n", len); PRINT_ER("can't write data with the following length: %d\n", len);
...@@ -377,7 +376,6 @@ int linux_spi_read(unsigned char *rb, unsigned long rlen) ...@@ -377,7 +376,6 @@ int linux_spi_read(unsigned char *rb, unsigned long rlen)
} }
} }
if (t_buffer)
kfree(t_buffer); kfree(t_buffer);
} else { } else {
PRINT_ER("can't read data with the following length: %ld\n", rlen); PRINT_ER("can't read data with the following length: %ld\n", rlen);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment