All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthias Brugger <matthias.bgg@gmail.com>
To: ye.xingchen@zte.com.cn
Cc: angelogioacchino.delregno@collabora.com,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] soc: mediatek: mutex: Use dev_err_probe()
Date: Sun, 2 Apr 2023 19:27:44 +0200	[thread overview]
Message-ID: <b656b070-28e6-48ae-5a17-f9ee3b25baae@gmail.com> (raw)
In-Reply-To: <202303241017290414354@zte.com.cn>



On 24/03/2023 03:17, ye.xingchen@zte.com.cn wrote:
> From: Ye Xingchen <ye.xingchen@zte.com.cn>
> 
> Replace the open-code with dev_err_probe() to simplify the code.
> 
> Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>

Applied, thanks

> ---
>   drivers/soc/mediatek/mtk-mutex.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/soc/mediatek/mtk-mutex.c b/drivers/soc/mediatek/mtk-mutex.c
> index 7751527fc30d..05c8ad3c2664 100644
> --- a/drivers/soc/mediatek/mtk-mutex.c
> +++ b/drivers/soc/mediatek/mtk-mutex.c
> @@ -1014,11 +1014,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, &regs);

WARNING: multiple messages have this Message-ID (diff)
From: Matthias Brugger <matthias.bgg@gmail.com>
To: ye.xingchen@zte.com.cn
Cc: angelogioacchino.delregno@collabora.com,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] soc: mediatek: mutex: Use dev_err_probe()
Date: Sun, 2 Apr 2023 19:27:44 +0200	[thread overview]
Message-ID: <b656b070-28e6-48ae-5a17-f9ee3b25baae@gmail.com> (raw)
In-Reply-To: <202303241017290414354@zte.com.cn>



On 24/03/2023 03:17, ye.xingchen@zte.com.cn wrote:
> From: Ye Xingchen <ye.xingchen@zte.com.cn>
> 
> Replace the open-code with dev_err_probe() to simplify the code.
> 
> Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>

Applied, thanks

> ---
>   drivers/soc/mediatek/mtk-mutex.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/soc/mediatek/mtk-mutex.c b/drivers/soc/mediatek/mtk-mutex.c
> index 7751527fc30d..05c8ad3c2664 100644
> --- a/drivers/soc/mediatek/mtk-mutex.c
> +++ b/drivers/soc/mediatek/mtk-mutex.c
> @@ -1014,11 +1014,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, &regs);

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2023-04-02 17:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-24  2:17 [PATCH] soc: mediatek: mutex: Use dev_err_probe() ye.xingchen
2023-03-24  2:17 ` ye.xingchen
2023-03-24  8:28 ` AngeloGioacchino Del Regno
2023-03-24  8:28   ` AngeloGioacchino Del Regno
2023-04-02 17:27 ` Matthias Brugger [this message]
2023-04-02 17:27   ` Matthias Brugger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b656b070-28e6-48ae-5a17-f9ee3b25baae@gmail.com \
    --to=matthias.bgg@gmail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=ye.xingchen@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.