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 __devinitsmsc911x_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