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

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.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6c90bade
......@@ -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);
}
/******************
......
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