Skip to contentSkip to conversation

return value of platform_get_irq

DISCUSSION Uwe Kleine-König 1 participant 1 message Dec 10, 2009

lore
Share & tools
lore
#0 lore raw

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

Signature · 2 lines
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |