Re: [PATCH v2] serial: mxs-auart: Fix potential infinite loop

2018-08-22 Thread Uwe Kleine-König
On Tue, Aug 07, 2018 at 01:59:05PM +0300, Anton Vasilyev wrote: > On the error path of mxs_auart_request_gpio_irq() is performed > backward iterating with index i of enum type. Underline enum type > may be unsigned char. In this case check (--i >= 0) will be always > true and error handling goes

Re: [PATCH v2] serial: mxs-auart: Fix potential infinite loop

2018-08-22 Thread Uwe Kleine-König
On Tue, Aug 07, 2018 at 01:59:05PM +0300, Anton Vasilyev wrote: > On the error path of mxs_auart_request_gpio_irq() is performed > backward iterating with index i of enum type. Underline enum type > may be unsigned char. In this case check (--i >= 0) will be always > true and error handling goes

[PATCH v2] serial: mxs-auart: Fix potential infinite loop

2018-08-07 Thread Anton Vasilyev
On the error path of mxs_auart_request_gpio_irq() is performed backward iterating with index i of enum type. Underline enum type may be unsigned char. In this case check (--i >= 0) will be always true and error handling goes into infinite loop. The patch changes the check so that it is valid for

[PATCH v2] serial: mxs-auart: Fix potential infinite loop

2018-08-07 Thread Anton Vasilyev
On the error path of mxs_auart_request_gpio_irq() is performed backward iterating with index i of enum type. Underline enum type may be unsigned char. In this case check (--i >= 0) will be always true and error handling goes into infinite loop. The patch changes the check so that it is valid for