Re: [PATCH] mtd: mtdswap: remove debugfs stats file on teardown

From: Miquel Raynal

Date: Mon Jun 22 2026 - 05:19:33 EST


Hello,

> @@ -1463,6 +1465,8 @@ static void mtdswap_remove_dev(struct mtd_blktrans_dev *dev)
> {
> struct mtdswap_dev *d = MTDSWAP_MBD_TO_MTDSWAP(dev);
>
> + if (!IS_ERR_OR_NULL(d->debugfs_stats))
> + debugfs_remove(d->debugfs_stats);

Please check debugfs_remove() implementation, the 'if' condition
is already handled and therefore does not need to be done here.

Thanks,
Miquèl