Linux-RTC Archive on lore.kernel.org
 help / color / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Mao Wenan <maowenan@huawei.com>
Cc: eddie.huang@mediatek.com, sean.wang@mediatek.com,
	a.zummo@towertech.it, matthias.bgg@gmail.com,
	dan.carpenter@oracle.com, linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-rtc@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Hulk Robot <hulkci@huawei.com>
Subject: Re: [PATCH v2 -next] rtc: mt6397: drop free_irq of devm_xx allocated irq
Date: Wed, 4 Dec 2019 09:40:36 +0100
Message-ID: <20191204084036.GK909634@piout.net> (raw)
In-Reply-To: <20191204072826.117432-1-maowenan@huawei.com>

On 04/12/2019 15:28:26+0800, Mao Wenan wrote:
> rtc->irq is requested by devm_request_threaded_irq,
> and request_threaded_irq. IRQs requested with this
> function will be automatically freed on driver detach.
> This patch remove unused error label as well.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Mao Wenan <maowenan@huawei.com>
> ---
>  v2: remove error label as Dan Carpenter suggest.
>  drivers/rtc/rtc-mt6397.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-mt6397.c b/drivers/rtc/rtc-mt6397.c
> index 5249fc99fd5f..14f3c4915260 100644
> --- a/drivers/rtc/rtc-mt6397.c
> +++ b/drivers/rtc/rtc-mt6397.c
> @@ -287,13 +287,6 @@ static int mtk_rtc_probe(struct platform_device *pdev)
>  	rtc->rtc_dev->ops = &mtk_rtc_ops;
>  
>  	ret = rtc_register_device(rtc->rtc_dev);
> -	if (ret)
> -		goto out_free_irq;
> -
> -	return 0;
> -
> -out_free_irq:
> -	free_irq(rtc->irq, rtc);
>  	return ret;

Maybe return rtc_register_device(rtc->rtc_dev); 

>  }
>  
> -- 
> 2.20.1
> 

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04  2:02 [PATCH " Mao Wenan
2019-12-04  6:35 ` Dan Carpenter
2019-12-04  7:28   ` [PATCH v2 " Mao Wenan
2019-12-04  8:40     ` Alexandre Belloni [this message]
2019-12-04  8:42       ` Alexandre Belloni

Reply instructions:

You may reply publically 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=20191204084036.GK909634@piout.net \
    --to=alexandre.belloni@bootlin.com \
    --cc=a.zummo@towertech.it \
    --cc=dan.carpenter@oracle.com \
    --cc=eddie.huang@mediatek.com \
    --cc=hulkci@huawei.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=maowenan@huawei.com \
    --cc=matthias.bgg@gmail.com \
    --cc=sean.wang@mediatek.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

Linux-RTC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rtc/0 linux-rtc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rtc linux-rtc/ https://lore.kernel.org/linux-rtc \
		linux-rtc@vger.kernel.org
	public-inbox-index linux-rtc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rtc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git