Re: [PATCH] drivers: ras: cec: return value check of `d`

From: Borislav Petkov
Date: Sun Apr 23 2023 - 08:57:06 EST


On Sun, Apr 23, 2023 at 08:29:32PM +0800, Ruliang Lin wrote:
> According to the documentation of the debugfs_create_dir() function,
> there is no need to check the return value of this function.

" * Drivers should generally work fine even if debugfs fails to init anyway."

Except that this particular driver won't if there is no debugfs
hierarchy created.

> Just delete the dead code.

So no, in this case it is not dead code but very much alive.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette