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

Commit c265a0d5 authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman
Browse files

pcie-gadget-spear: fix error return code in spear_pcie_gadget_probe()



Fix to return a negative error code in the clk_get_sys() and clk_enable()
error handling case instead of 0, as done elsewhere in this function.

Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fca59755
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -814,9 +814,11 @@ static int spear_pcie_gadget_probe(struct platform_device *pdev)
		clk = clk_get_sys("pcie1", NULL);
		if (IS_ERR(clk)) {
			pr_err("%s:couldn't get clk for pcie1\n", __func__);
			status = PTR_ERR(clk);
			goto err_irq;
		}
		if (clk_enable(clk)) {
		status = clk_enable(clk);
		if (status) {
			pr_err("%s:couldn't enable clk for pcie1\n", __func__);
			goto err_irq;
		}
@@ -828,9 +830,11 @@ static int spear_pcie_gadget_probe(struct platform_device *pdev)
		clk = clk_get_sys("pcie2", NULL);
		if (IS_ERR(clk)) {
			pr_err("%s:couldn't get clk for pcie2\n", __func__);
			status = PTR_ERR(clk);
			goto err_irq;
		}
		if (clk_enable(clk)) {
		status = clk_enable(clk);
		if (status) {
			pr_err("%s:couldn't enable clk for pcie2\n", __func__);
			goto err_irq;
		}