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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1462382.yEDobJovyP@barack>
Date:	Tue, 5 Jul 2011 17:10:13 +0300
From:	Péter Ujfalusi <peter.ujfalusi@...com>
To:	"Balbi, Felipe" <balbi@...com>
CC:	"Girdwood, Liam" <lrg@...com>, Tony Lindgren <tony@...mide.com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
	"Lopez Cruz, Misael" <misael.lopez@...com>
Subject: Re: Re: [PATCH v2 2/5] input: twl6040-vibra: Do not use wrapper for irq request

On Tuesday 05 July 2011 15:57:46 Balbi, Felipe wrote:
> > +	info->irq = platform_get_irq(pdev, 0);
> > +	if (!info->irq) {
> 
> this is wrong. platform_get_irq() will return -ENXIO if it can't find
> the IRQ you requested:
> 
>   55 /**
>   56  * platform_get_irq - get an IRQ for a device
>   57  * @dev: platform device
>   58  * @num: IRQ number index
>   59  */
>   60 int platform_get_irq(struct platform_device *dev, unsigned int num)
>   61 {
>   62         struct resource *r = platform_get_resource(dev, IORESOURCE_IRQ,
> num); 63
>   64         return r ? r->start : -ENXIO;
>   65 }
>   66 EXPORT_SYMBOL_GPL(platform_get_irq);

Yes, I have not checked that..
Will replace the check with (info->irq< 0) checks in both slaves.

Thanks for noticing it!
I'll wait a bit for other comments, and will resend.

-- 
Péter
--
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