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

2018-04-12 Thread Mark Brown
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 fi

[PATCH] regmap: debugfs: check pointer before access

2018-03-29 Thread Peng Fan
When access the /sys/kernel/debug/regmap/5-0033/name, kernel reports NULL pointer access, it is because the driver point is null when accessing map->dev->driver->name. root@imx8qmmek:~# cat /sys/kernel/debug/regmap/5-0033/name [ 26.553924] Unable to handle kernel NULL pointer dereference at virt