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>
This commit is contained in:
parent
6c90bade52
commit
d59381d639
|
@ -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);
|
||||
}
|
||||
|
||||
/******************
|
||||
|
|
Loading…
Reference in New Issue