mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Yang Yingliang <yangyingliang@huawei.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Cc: daniel@ffwll.ch, airlied@linux.ie, patrik.r.jakobsson@gmail.com
Subject: Re: [PATCH -next] drm/gma500: Fix wrong pointer passed to PTR_ERR()
Date: Fri, 24 Sep 2021 11:50:52 +0200	[thread overview]
Message-ID: <dc360ac4-a731-bb87-b9ae-bf3addb54448@suse.de> (raw)
In-Reply-To: <20210924094040.3631675-1-yangyingliang@huawei.com>


[-- Attachment #1.1: Type: text/plain, Size: 1316 bytes --]

Hi

Am 24.09.21 um 11:40 schrieb Yang Yingliang:
> PTR_ERR() should access the value just tested by IS_ERR(),
> otherwise the wrong error code will be returned.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>

Indeed, thanks for the patch.

I'll add the fix with the correct Fixes tag soon.

Best regards
Thomas

> ---
>   drivers/gpu/drm/gma500/psb_drv.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
> index 3d036d2a3b29..7a10bb39ef0b 100644
> --- a/drivers/gpu/drm/gma500/psb_drv.c
> +++ b/drivers/gpu/drm/gma500/psb_drv.c
> @@ -454,7 +454,7 @@ static int psb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>   
>   	dev_priv = devm_drm_dev_alloc(&pdev->dev, &driver, struct drm_psb_private, dev);
>   	if (IS_ERR(dev_priv))
> -		return PTR_ERR(dev);
> +		return PTR_ERR(dev_priv);
>   	dev = &dev_priv->dev;
>   
>   	pci_set_drvdata(pdev, dev);
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

      reply	other threads:[~2021-09-24  9:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24  9:40 Yang Yingliang
2021-09-24  9:50 ` Thomas Zimmermann [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=dc360ac4-a731-bb87-b9ae-bf3addb54448@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patrik.r.jakobsson@gmail.com \
    --cc=yangyingliang@huawei.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®