Re: [PATCH] gpio: mxs: implement get_direction callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2014-11-17 15:29 GMT+01:00 Janusz Użycki <j.uzycki@xxxxxxxxxxxxxx>:
> Hi Richard,
>
> W dniu 2014-11-17 o 11:05, Richard Genoud pisze:
>>
>> 2014-11-17 10:59 GMT+01:00 Uwe Kleine-König
>> <u.kleine-koenig@xxxxxxxxxxxxxx>:
>>
>> well, in this case, request_irq() will fail and all the previously
>> requested irqs will be freed:
>>      /*
>>       * If something went wrong, rollback.
>>       */
>>      while (err && (--i >= 0))
>>          if (irq[i] >= 0)
>>              free_irq(irq[i], port);
>
>
> I hesitate if use the rollback or just call mctrl_gpio_free_irqs().
> Let's note that "i" is enum and the loop ends on i < 0.

That's right, it's a bug.
I thought that enum was signed, but actually, it could be unsigned on
some platforms.
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux