mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Wang <peter.wang@mediatek.com>
To: <cgel.zte@gmail.com>, <stanley.chu@mediatek.com>
Cc: <alim.akhtar@samsung.com>, <avri.altman@wdc.com>,
	<jejb@linux.ibm.com>, <martin.petersen@oracle.com>,
	<matthias.bgg@gmail.com>, <linux-scsi@vger.kernel.org>,
	<linux-mediatek@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	Ye Guojin <ye.guojin@zte.com.cn>, Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH] scsi: ufs: ufs-mediatek: add put_device() after of_find_device_by_node()
Date: Thu, 11 Nov 2021 13:52:08 +0800	[thread overview]
Message-ID: <b4b38f93-27a7-53d0-b20f-0e9728ef6dbe@mediatek.com> (raw)
In-Reply-To: <20211110105133.150171-1-ye.guojin@zte.com.cn>


On 11/10/21 6:51 PM, cgel.zte@gmail.com wrote:
> From: Ye Guojin <ye.guojin@zte.com.cn>
>
> This was found by coccicheck:
> ./drivers/scsi/ufs/ufs-mediatek.c, 211, 1-7, ERROR missing put_device;
> call of_find_device_by_node on line 1185, but without a corresponding
> object release within this function.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Ye Guojin <ye.guojin@zte.com.cn>
> ---
>   drivers/scsi/ufs/ufs-mediatek.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/ufs/ufs-mediatek.c b/drivers/scsi/ufs/ufs-mediatek.c
> index fc5b214347b3..5393b5c9dd9c 100644
> --- a/drivers/scsi/ufs/ufs-mediatek.c
> +++ b/drivers/scsi/ufs/ufs-mediatek.c
> @@ -1189,6 +1189,7 @@ static int ufs_mtk_probe(struct platform_device *pdev)
>   	}
>   	link = device_link_add(dev, &reset_pdev->dev,
>   		DL_FLAG_AUTOPROBE_CONSUMER);
> +	put_device(&reset_pdev->dev);


Thanks for fix this missing.
Reviewed-by: Peter Wang <peter.wang@mediatek.com>


>   	if (!link) {
>   		dev_notice(dev, "add reset device_link fail\n");
>   		goto skip_reset;

  parent reply	other threads:[~2021-11-11  5:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10 10:51 cgel.zte
2021-11-11  5:41 ` Peter Wang
2021-11-11  5:52 ` Peter Wang [this message]
2021-11-19  4:16 ` Martin K. Petersen

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=b4b38f93-27a7-53d0-b20f-0e9728ef6dbe@mediatek.com \
    --to=peter.wang@mediatek.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=cgel.zte@gmail.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=matthias.bgg@gmail.com \
    --cc=stanley.chu@mediatek.com \
    --cc=ye.guojin@zte.com.cn \
    --cc=zealci@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 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®