[PATCH] ubifs: no need to check return value of debugfs_create functions
gregkh at linuxfoundation.org
Wed Jun 12 22:47:23 PDT 2019
On Wed, Jun 12, 2019 at 08:53:57PM +0200, Richard Weinberger wrote:
> ----- Ursprüngliche Mail -----
> > Von: "Greg Kroah-Hartman" <gregkh at linuxfoundation.org>
> > An: "richard" <richard at nod.at>, "Artem Bityutskiy" <dedekind1 at gmail.com>, "Adrian Hunter" <adrian.hunter at intel.com>
> > CC: "linux-mtd" <linux-mtd at lists.infradead.org>
> > Gesendet: Mittwoch, 12. Juni 2019 17:21:20
> > Betreff: [PATCH] ubifs: no need to check return value of debugfs_create functions
> > When calling debugfs functions, there is no need to ever check the
> > return value. The function can work or not, but the code logic should
> > never do something different based on this.
> why is it bad if we handle errors from debugfs?
Because there is no need to? If debugfs fails, there is nothing that a
user can do about it :)
> At least a nice log message a la "sorry, no ubifs debuging for you"
> would be nice to have.
I think the lack of a debugfs file is kind of obvious :)
Anyway, the point is that there is no need to check for return values
from debugfs, and the logic of the non-debugfs code should not do
anything different if debugfs is acting up or not.
More information about the linux-mtd