mmc: meson-mx-sdhc: use PTR_ERR_OR_ZERO() to simplify code

Use the standard error pointer macro to shorten the code and simplify.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20250812092908.101867-1-zhao.xichao@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
Xichao Zhao 2025-08-12 17:29:08 +08:00 committed by Ulf Hansson
parent d2e6fb2c31
commit 40c3c7dec7
1 changed files with 1 additions and 3 deletions

View File

@ -84,10 +84,8 @@ static int meson_mx_sdhc_gate_clk_hw_register(struct device *dev,
return ret;
clk_bulk_data[bulk_index].clk = devm_clk_hw_get_clk(dev, hw, name_suffix);
if (IS_ERR(clk_bulk_data[bulk_index].clk))
return PTR_ERR(clk_bulk_data[bulk_index].clk);
return 0;
return PTR_ERR_OR_ZERO(clk_bulk_data[bulk_index].clk);
}
int meson_mx_sdhc_register_clkc(struct device *dev, void __iomem *base,