lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AANLkTinDYgJBG8VUn6w6pJ==743WEf9PFuQ3jErwjo0a@mail.gmail.com>
Date:	Thu, 31 Mar 2011 22:59:31 +0800
From:	Wan ZongShun <mcuos.com@...il.com>
To:	rtc-linux@...glegroups.com,
	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Nicolas Kaiser <nikai@...ai.net>,
	Lars-Peter Clausen <lars@...afoo.de>,
	Alessandro Zummo <a.zummo@...ertech.it>,
	linux-kernel@...r.kernel.org
Subject: Re: [rtc-linux] [PATCH] drivers/rtc/rtc-jz4740.c: fix error check v2

2011/3/31 Nicolas Kaiser <nikai@...ai.net>:
> Checking 'rtc->irq < 0' doesn't work because 'rtc->irq' is unsigned.
>
> v2: return error code from platform_get_irq() instead of -ENOENT.
>
> Signed-off-by: Nicolas Kaiser <nikai@...ai.net>
> ---
>  drivers/rtc/rtc-jz4740.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c
> index b647363..efd9691 100644
> --- a/drivers/rtc/rtc-jz4740.c
> +++ b/drivers/rtc/rtc-jz4740.c
> @@ -220,12 +220,12 @@ static int __devinit jz4740_rtc_probe(struct platform_device *pdev)
>        if (!rtc)
>                return -ENOMEM;
>
> -       rtc->irq = platform_get_irq(pdev, 0);
> -       if (rtc->irq < 0) {
> -               ret = -ENOENT;
> +       ret = platform_get_irq(pdev, 0);
> +       if (ret < 0) {
>                dev_err(&pdev->dev, "Failed to get platform irq\n");
>                goto err_free;
>        }
> +       rtc->irq = ret;
>

This patch looks good to me.

Acked-by: Wan ZongShun <mcuos.com@...il.com>

>        rtc->mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>        if (!rtc->mem) {
> --
> 1.7.3.4
>
> --
> You received this message because you are subscribed to "rtc-linux".
> Membership options at http://groups.google.com/group/rtc-linux .
> Please read http://groups.google.com/group/rtc-linux/web/checklist
> before submitting a driver.



-- 
*linux-arm-kernel mailing list
mail addr:linux-arm-kernel@...ts.infradead.org
you can subscribe by:
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

* linux-arm-NUC900 mailing list
mail addr:NUC900@...glegroups.com
main web: https://groups.google.com/group/NUC900
you can subscribe it by sending me mail:
mcuos.com@...il.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ