diff options
author | Ye Xingchen <ye.xingchen@zte.com.cn> | 2023-03-24 10:17:29 +0800 |
---|---|---|
committer | Matthias Brugger <matthias.bgg@gmail.com> | 2023-04-02 19:27:30 +0200 |
commit | a73a7c41de593ea08f5a659b2b6ff4b5af493bbb (patch) | |
tree | 8065cd6868ada77ce5af26e1215b7e8f63a9cb4a /drivers/soc/mediatek | |
parent | e9a6f5bca5ea56f05d92a966034ed472408821b8 (diff) |
soc: mediatek: mutex: Use dev_err_probe()
Replace the open-code with dev_err_probe() to simplify the code.
Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/202303241017290414354@zte.com.cn
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Diffstat (limited to 'drivers/soc/mediatek')
-rw-r--r-- | drivers/soc/mediatek/mtk-mutex.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/soc/mediatek/mtk-mutex.c b/drivers/soc/mediatek/mtk-mutex.c index b92cffec7be7..26f3d9a41496 100644 --- a/drivers/soc/mediatek/mtk-mutex.c +++ b/drivers/soc/mediatek/mtk-mutex.c @@ -1008,11 +1008,8 @@ static int mtk_mutex_probe(struct platform_device *pdev) if (!mtx->data->no_clk) { mtx->clk = devm_clk_get(dev, NULL); - if (IS_ERR(mtx->clk)) { - if (PTR_ERR(mtx->clk) != -EPROBE_DEFER) - dev_err(dev, "Failed to get clock\n"); - return PTR_ERR(mtx->clk); - } + if (IS_ERR(mtx->clk)) + return dev_err_probe(dev, PTR_ERR(mtx->clk), "Failed to get clock\n"); } mtx->regs = devm_platform_get_and_ioremap_resource(pdev, 0, ®s); |