return value of platform_get_irq

From: Uwe Kleine-König
Date: Thu Dec 10 2009 - 03:56:07 EST


Hello Julia,

in commit 305b3228 the return value indicating failure in
platform_get_irq was changed.

I tried to create a semantic patch for that, but I have failed as spatch
always says something like:

Fatal error: exception Failure("minus: parse error: ...

Actually what is needed is that (probably) all usages of:

ret = platform_get_irq(dev, num);
if (!ret) {
...

and equivalent are converted to

ret = platform_get_irq(dev, num);
if (ret <= 0) {
...

(Actually I think "ret < 0" would be more correct in most situations,
but as 0 was handled as error before it's more conservative to keep it
this way.)

I assume it's easy for you to come up with a patch.

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/