staging: kpc2000: kpc_spi: Remove unnecessary null check before kfree
PATCH 1/1 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 <[email protected]>
--- drivers/staging/kpc2000/kpc2000_spi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/kpc2000/kpc2000_spi.c +1 -2
@@ -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); }/******************
Signature · 1 line
2.7.4