Skip to content

Commit a73a7c4

Browse files
Ye Xingchenmbgg
authored andcommitted
soc: mediatek: mutex: Use dev_err_probe()
Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Ye Xingchen <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matthias Brugger <[email protected]>
1 parent e9a6f5b commit a73a7c4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/soc/mediatek/mtk-mutex.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,11 +1008,8 @@ static int mtk_mutex_probe(struct platform_device *pdev)
10081008

10091009
if (!mtx->data->no_clk) {
10101010
mtx->clk = devm_clk_get(dev, NULL);
1011-
if (IS_ERR(mtx->clk)) {
1012-
if (PTR_ERR(mtx->clk) != -EPROBE_DEFER)
1013-
dev_err(dev, "Failed to get clock\n");
1014-
return PTR_ERR(mtx->clk);
1015-
}
1011+
if (IS_ERR(mtx->clk))
1012+
return dev_err_probe(dev, PTR_ERR(mtx->clk), "Failed to get clock\n");
10161013
}
10171014

10181015
mtx->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &regs);

0 commit comments

Comments
 (0)