Skip to content

Commit

Permalink
spi/txx9: Deletion of an unnecessary check before the function call "…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Markus Elfring authored and Mark Brown committed Dec 1, 2014
1 parent f114040 commit 7d57cd8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/spi/spi-txx9.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,7 @@ static int txx9spi_probe(struct platform_device *dev)
exit:
if (c->workqueue)
destroy_workqueue(c->workqueue);
if (c->clk)
clk_disable(c->clk);
clk_disable(c->clk);
spi_master_put(master);
return ret;
}
Expand Down

0 comments on commit 7d57cd8

Please sign in to comment.