Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eadf69cf authored by Wei Yongjun's avatar Wei Yongjun Committed by Mark Brown
Browse files

spi: mpc512x: fix error return code in mpc512x_psc_spi_do_probe()



Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 57873925
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -522,8 +522,10 @@ static int mpc512x_psc_spi_do_probe(struct device *dev, u32 regaddr,
	psc_num = master->bus_num;
	snprintf(clk_name, sizeof(clk_name), "psc%d_mclk", psc_num);
	clk = devm_clk_get(dev, clk_name);
	if (IS_ERR(clk))
	if (IS_ERR(clk)) {
		ret = PTR_ERR(clk);
		goto free_irq;
	}
	ret = clk_prepare_enable(clk);
	if (ret)
		goto free_irq;