Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi/txx9: Deletion of an unnecessary check before the function call "clk_disable"

The clk_disable() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Markus Elfring and committed by
Mark Brown
7d57cd89 f114040e

+1 -2
+1 -2
drivers/spi/spi-txx9.c
··· 402 402 exit: 403 403 if (c->workqueue) 404 404 destroy_workqueue(c->workqueue); 405 - if (c->clk) 406 - clk_disable(c->clk); 405 + clk_disable(c->clk); 407 406 spi_master_put(master); 408 407 return ret; 409 408 }