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: Abdul Hussain <habdul@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
61500fbd77
commit
0256b5406e
|
@ -214,7 +214,6 @@ int linux_spi_write(uint8_t *b, uint32_t len)
|
|||
PRINT_ER("SPI transaction failed\n");
|
||||
}
|
||||
}
|
||||
if (r_buffer)
|
||||
kfree(r_buffer);
|
||||
} else {
|
||||
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)
|
|||
}
|
||||
}
|
||||
|
||||
if (t_buffer)
|
||||
kfree(t_buffer);
|
||||
} else {
|
||||
PRINT_ER("can't read data with the following length: %ld\n", rlen);
|
||||
|
|
Loading…
Reference in a new issue