Commit d59381d6 authored by YueHaibing's avatar YueHaibing Committed by Greg Kroah-Hartman
Browse files

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: default avatarYueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190711140726.46732-1-yuehaibing@huawei.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6c90bade
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -412,7 +412,6 @@ kp_spi_cleanup(struct spi_device *spidev)
{
	struct kp_spi_controller_state *cs = spidev->controller_state;

	if (cs)
	kfree(cs);
}