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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 21 Jan 2009 15:54:04 +0000
From:	Steve.Glendinning@...c.com
To:	Ben Dooks <ben-linux@...ff.org>
Cc:	David Miller <davem@...emloft.net>, ian.saturley@...c.com,
	Russell King <linux@....linux.org.uk>,
	linux-arm-kernel@...ts.arm.linux.org.uk, netdev@...r.kernel.org,
	Stanley Miao <stanley.miao@...driver.com>
Subject: Re: [PATCH 1/6] smsc911x: add support for platform-specific irq flags

Hi Ben,

Ben Dooks <ben-linux@...ff.org> wrote on 20/01/2009 14:55:39:
> On Tue, Jan 20, 2009 at 01:28:29PM +0000, Steve Glendinning wrote:
> > @@ -1919,6 +1919,14 @@ static int __devinit 
> smsc911x_drv_probe(struct platform_device *pdev)
> >     }
> >     res_size = res->end - res->start;
> > 
> > +   irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> > +   if (!irq_res) {
> > +      pr_warning("%s: Could not allocate irq resource.\n",
> > +         SMSC_CHIPNAME);
> > +      retval = -ENODEV;
> > +      goto out_0;
> 
> -ENODEV is certainly not the right code to be returning here, it is
> likely to get lost in the driver porbe process.
> 

Thanks for spotting this.

This probe function also returns -ENODEV in two other places: if 
platform_data is null or if it fails to get it's IORESOURCE_MEM.  I guess 
these should all be fixed, which return code should the driver use to 
indicate "my platform_data is missing or incomplete"?

Steve
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ