Thread (23 messages) flat view 23 messages, 8 authors, 2009-01-26

Re: [PATCH 1/6] smsc911x: add support for platform-specific irq flags

From: <hidden>
Date: 2009-01-21 15:55:56

Hi Ben,

Ben Dooks [off-list ref] wrote on 20/01/2009 14:55:39:
On Tue, Jan 20, 2009 at 01:28:29PM +0000, Steve Glendinning wrote:
quoted
@@ -1919,6 +1919,14 @@ static int __devinit 
smsc911x_drv_probe(struct platform_device *pdev)
quoted
    }
    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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help