[PATCH] mtd: nand: Add error log for marvell_nfc_end_cmd()

Miquel Raynal miquel.raynal at bootlin.com
Sun Apr 6 23:59:23 PDT 2025


Hello Liang,

On 07/04/2025 at 10:09:16 +08, Wentao Liang <vulab at iscas.ac.cn> wrote:

> The function marvell_nfc_hw_ecc_bch_read_chunk() calls the function
> marvell_nfc_end_cmd(), but dose not check its return value. Since it
> is incorrect to bail from the loop if the marvell_nfc_end_cmd() fails,
> an error log is necessary to prevent silent failure.

The failure will not be silent, *_read_chunk() is called in
marvell_nfc_hw_ecc_bch_read_page() only, where the validity of the data
will be checked. If you really want to make it visible *there* I believe
the correct approach is to change the caller prototype and forward the
error instead.

Thanks,
Miquèl



More information about the linux-mtd mailing list