mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ray Jui <ray.jui@broadcom.com>
To: Cai Huoqing <caihuoqing@baidu.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	bcm-kernel-feedback-list@broadcom.com,
	linux-input@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: bcm_iproc_tsc - Make use of the helper function dev_err_probe()
Date: Thu, 16 Sep 2021 10:02:31 -0700	[thread overview]
Message-ID: <17b3aba7-4093-3ce1-de16-5cecb29391cd@broadcom.com> (raw)
In-Reply-To: <20210916153126.13886-1-caihuoqing@baidu.com>

[-- Attachment #1: Type: text/plain, Size: 1336 bytes --]



On 9/16/2021 8:31 AM, Cai Huoqing wrote:
> When possible use dev_err_probe help to properly deal with the
> PROBE_DEFER error, the benefit is that DEFER issue will be logged
> in the devices_deferred debugfs file.
> Using dev_err_probe() can reduce code size, and the error value
> gets printed.
> 
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
> ---
>  drivers/input/touchscreen/bcm_iproc_tsc.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/input/touchscreen/bcm_iproc_tsc.c b/drivers/input/touchscreen/bcm_iproc_tsc.c
> index 7de1fd24ce36..c6aaeaee1d12 100644
> --- a/drivers/input/touchscreen/bcm_iproc_tsc.c
> +++ b/drivers/input/touchscreen/bcm_iproc_tsc.c
> @@ -441,12 +441,9 @@ static int iproc_ts_probe(struct platform_device *pdev)
>  	}
>  
>  	priv->tsc_clk = devm_clk_get(&pdev->dev, "tsc_clk");
> -	if (IS_ERR(priv->tsc_clk)) {
> -		error = PTR_ERR(priv->tsc_clk);
> -		dev_err(&pdev->dev,
> -			"failed getting clock tsc_clk: %d\n", error);
> -		return error;
> -	}
> +	if (IS_ERR(priv->tsc_clk))
> +		return dev_err_probe(&pdev->dev, PTR_ERR(priv->tsc_clk),
> +				     "failed getting clock tsc_clk\n");
>  
>  	priv->pdev = pdev;
>  	error = iproc_get_tsc_config(&pdev->dev, priv);
> 

Improvement looks good to me. Thanks.

Acked-by: Ray Jui <ray.jui@broadcom.com>

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4194 bytes --]

      reply	other threads:[~2021-09-16 18:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16 15:31 Cai Huoqing
2021-09-16 17:02 ` Ray Jui [this message]

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=17b3aba7-4093-3ce1-de16-5cecb29391cd@broadcom.com \
    --to=ray.jui@broadcom.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=caihuoqing@baidu.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®