mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>,
	Mike Leach <mike.leach@linaro.org>,
	linux-kernel@vger.kernel.org,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>
Subject: Re: [PATCH v1] coresight: Drop double check for ACPI companion device
Date: Mon, 1 Jun 2020 13:57:21 -0600	[thread overview]
Message-ID: <20200601195721.GA24287@xps15> (raw)
In-Reply-To: <20200529133210.20566-1-andriy.shevchenko@linux.intel.com>

Hi Andy,

On Fri, May 29, 2020 at 04:32:10PM +0300, Andy Shevchenko wrote:
> acpi_dev_get_resources() does perform the NULL pointer check against
> ACPI companion device which is given as function parameter. Thus,
> there is no need to duplicate this check in the caller.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/hwtracing/coresight/coresight-stm.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-stm.c b/drivers/hwtracing/coresight/coresight-stm.c
> index b908ca104645..673d2f56ed1e 100644
> --- a/drivers/hwtracing/coresight/coresight-stm.c
> +++ b/drivers/hwtracing/coresight/coresight-stm.c
> @@ -727,8 +727,6 @@ static int acpi_stm_get_stimulus_area(struct device *dev, struct resource *res)
>  
>  	struct acpi_device *adev = ACPI_COMPANION(dev);
>  
> -	if (!adev)
> -		return -ENODEV;
>  	rc = acpi_dev_get_resources(adev, &res_list, NULL, NULL);
>  	if (rc < 0)
>  		return rc;

I have applied your patch.

Thanks,
Mathieu

> -- 
> 2.26.2
> 

      reply	other threads:[~2020-06-01 19:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29 13:32 Andy Shevchenko
2020-06-01 19:57 ` Mathieu Poirier [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=20200601195721.GA24287@xps15 \
    --to=mathieu.poirier@linaro.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike.leach@linaro.org \
    --cc=suzuki.poulose@arm.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

Powered by JetHome