lkml.org 
[lkml]   [2023]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] mtd: nand: mxic-ecc: Fix mxic_ecc_data_xfer_wait_for_completion() when irq is used
Date
On Wed, 2023-02-15 at 11:08:45 UTC, Christophe JAILLET wrote:
> wait_for_completion_timeout() and readl_poll_timeout() don't handle their
> return value the same way.
>
> wait_for_completion_timeout() returns 0 on time out (and >0 in all other
> cases)
> readl_poll_timeout() returns 0 on success and -ETIMEDOUT upon a timeout.
>
> In order for the error handling path to work in both cases, the logic
> against wait_for_completion_timeout() needs to be inverted.
>
> Fixes: 48e6633a9fa2 ("mtd: nand: mxic-ecc: Add Macronix external ECC engine support")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/fixes, thanks.

Miquel

\
 
 \ /
  Last update: 2023-03-27 00:47    [W:0.073 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site