projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d2e6fb2
)
mmc: meson-mx-sdhc: use PTR_ERR_OR_ZERO() to simplify code
author
Xichao Zhao
<zhao.xichao@vivo.com>
Tue, 12 Aug 2025 09:29:08 +0000
(17:29 +0800)
committer
Ulf Hansson
<ulf.hansson@linaro.org>
Tue, 19 Aug 2025 12:34:15 +0000
(14:34 +0200)
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>
drivers/mmc/host/meson-mx-sdhc-clkc.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/host/meson-mx-sdhc-clkc.c
b/drivers/mmc/host/meson-mx-sdhc-clkc.c
index
cbd17a5
..
6d619bd
100644
(file)
--- a/
drivers/mmc/host/meson-mx-sdhc-clkc.c
+++ b/
drivers/mmc/host/meson-mx-sdhc-clkc.c
@@
-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,