Re: [PATCH] regmap: debugfs: check pointer before access

From: Mark Brown
Date: Thu Apr 12 2018 - 10:45:12 EST


On Thu, Mar 29, 2018 at 08:21:54PM +0800, Peng Fan wrote:

> So add check here. When the driver pointer is NULL, return -EIO.

We should be providing a name if the file is there so rather than
returning an error we should provide something in the file so we should
either suppress creation of the file or provide a default string (the
latter is obviously easier and closer to what you have here).

Attachment: signature.asc
Description: PGP signature