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

spi: davinci: Handle return value of clk_prepare_enable

clk_prepare_enable() can fail here and we must check its return value.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Arvind Yadav and committed by
Mark Brown
35fc3b9f 2b747a5f

+3 -1
+3 -1
drivers/spi/spi-davinci.c
··· 964 964 ret = -ENODEV; 965 965 goto free_master; 966 966 } 967 - clk_prepare_enable(dspi->clk); 967 + ret = clk_prepare_enable(dspi->clk); 968 + if (ret) 969 + goto free_master; 968 970 969 971 master->dev.of_node = pdev->dev.of_node; 970 972 master->bus_num = pdev->id;