Skip to content

Commit

Permalink
spi: stm32: use NULL pointer instead of plain integer
Browse files Browse the repository at this point in the history
Patch fixes sparse warning: Using plain integer as NULL pointer. Replaces
second argument of function devm_clk_get from 0 to NULL.

Signed-off-by: Cezary Gapinski <cezary.gapinski@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Cezary Gapinski authored and Mark Brown committed Jan 7, 2019
1 parent d57a984 commit d4c9134
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi-stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,7 @@ static int stm32_spi_probe(struct platform_device *pdev)
goto err_master_put;
}

spi->clk = devm_clk_get(&pdev->dev, 0);
spi->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(spi->clk)) {
ret = PTR_ERR(spi->clk);
dev_err(&pdev->dev, "clk get failed: %d\n", ret);
Expand Down

0 comments on commit d4c9134

Please sign in to comment.