mirror of https://github.com/torvalds/linux.git
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:
parent
d2e6fb2c31
commit
40c3c7dec7
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue