1
0
Fork 0

staging: kpc2000: kpc_spi: Remove unnecessary null check before kfree

A null check before a kfree is redundant, so remove it.
This is detected by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190711140726.46732-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
alistair/sunxi64-5.4-dsi
YueHaibing 2019-07-11 22:07:26 +08:00 committed by Greg Kroah-Hartman
parent 6c90bade52
commit d59381d639
1 changed files with 1 additions and 2 deletions

View File

@ -412,8 +412,7 @@ kp_spi_cleanup(struct spi_device *spidev)
{
struct kp_spi_controller_state *cs = spidev->controller_state;
if (cs)
kfree(cs);
kfree(cs);
}
/******************