From: Himanshu Jha <himanshujha199640@gmail.com> To: a.zummo@towertech.it Cc: alexandre.belloni@free-electrons.com, baruch@tkos.co.il, linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Himanshu Jha <himanshujha199640@gmail.com> Subject: [PATCH] rtc: Use PTR_ERR_OR_ZERO Date: Tue, 29 Aug 2017 19:16:59 +0530 [thread overview] Message-ID: <1504014419-16894-1-git-send-email-himanshujha199640@gmail.com> (raw) Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> --- drivers/rtc/rtc-digicolor.c | 5 +---- drivers/rtc/rtc-ds1347.c | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/rtc/rtc-digicolor.c b/drivers/rtc/rtc-digicolor.c index b253bf1..1e200a0 100644 --- a/drivers/rtc/rtc-digicolor.c +++ b/drivers/rtc/rtc-digicolor.c @@ -202,10 +202,7 @@ static int __init dc_rtc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, rtc); rtc->rtc_dev = devm_rtc_device_register(&pdev->dev, pdev->name, &dc_rtc_ops, THIS_MODULE); - if (IS_ERR(rtc->rtc_dev)) - return PTR_ERR(rtc->rtc_dev); - - return 0; + return PTR_ERR_OR_ZERO(rtc->rtc_dev); } static const struct of_device_id dc_dt_ids[] = { diff --git a/drivers/rtc/rtc-ds1347.c b/drivers/rtc/rtc-ds1347.c index ccfc9d4..9a02ca7 100644 --- a/drivers/rtc/rtc-ds1347.c +++ b/drivers/rtc/rtc-ds1347.c @@ -155,10 +155,7 @@ static int ds1347_probe(struct spi_device *spi) rtc = devm_rtc_device_register(&spi->dev, "ds1347", &ds1347_rtc_ops, THIS_MODULE); - if (IS_ERR(rtc)) - return PTR_ERR(rtc); - - return 0; + return PTR_ERR_OR_ZERO(rtc); } static struct spi_driver ds1347_driver = { -- 2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: himanshujha199640@gmail.com (Himanshu Jha) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] rtc: Use PTR_ERR_OR_ZERO Date: Tue, 29 Aug 2017 19:16:59 +0530 [thread overview] Message-ID: <1504014419-16894-1-git-send-email-himanshujha199640@gmail.com> (raw) Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> --- drivers/rtc/rtc-digicolor.c | 5 +---- drivers/rtc/rtc-ds1347.c | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/rtc/rtc-digicolor.c b/drivers/rtc/rtc-digicolor.c index b253bf1..1e200a0 100644 --- a/drivers/rtc/rtc-digicolor.c +++ b/drivers/rtc/rtc-digicolor.c @@ -202,10 +202,7 @@ static int __init dc_rtc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, rtc); rtc->rtc_dev = devm_rtc_device_register(&pdev->dev, pdev->name, &dc_rtc_ops, THIS_MODULE); - if (IS_ERR(rtc->rtc_dev)) - return PTR_ERR(rtc->rtc_dev); - - return 0; + return PTR_ERR_OR_ZERO(rtc->rtc_dev); } static const struct of_device_id dc_dt_ids[] = { diff --git a/drivers/rtc/rtc-ds1347.c b/drivers/rtc/rtc-ds1347.c index ccfc9d4..9a02ca7 100644 --- a/drivers/rtc/rtc-ds1347.c +++ b/drivers/rtc/rtc-ds1347.c @@ -155,10 +155,7 @@ static int ds1347_probe(struct spi_device *spi) rtc = devm_rtc_device_register(&spi->dev, "ds1347", &ds1347_rtc_ops, THIS_MODULE); - if (IS_ERR(rtc)) - return PTR_ERR(rtc); - - return 0; + return PTR_ERR_OR_ZERO(rtc); } static struct spi_driver ds1347_driver = { -- 2.7.4
next reply other threads:[~2017-08-29 13:47 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-08-29 13:46 Himanshu Jha [this message] 2017-08-29 13:46 ` [PATCH] rtc: Use PTR_ERR_OR_ZERO Himanshu Jha 2017-08-29 14:20 ` Alexandre Belloni 2017-08-29 14:20 ` Alexandre Belloni 2017-08-29 14:44 ` Himanshu Jha 2017-08-29 14:44 ` Himanshu Jha
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=1504014419-16894-1-git-send-email-himanshujha199640@gmail.com \ --to=himanshujha199640@gmail.com \ --cc=a.zummo@towertech.it \ --cc=alexandre.belloni@free-electrons.com \ --cc=baruch@tkos.co.il \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-rtc@vger.kernel.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.