[PATCH v2] regmap: fix NULL pointer dereference in regmap_name_read_file()

2018-02-19 Thread David Lechner
This fixes a possible NULL pointer dereference oops in regmap_name_read_file() when the regmap does not have a device associated with it. For example syscon regmaps retrieved with syscon_regmap_lookup_by_compatible() don't have a device. Signed-off-by: David Lechner --- v2

[PATCH v2] regmap: fix NULL pointer dereference in regmap_name_read_file()

2018-02-19 Thread David Lechner
This fixes a possible NULL pointer dereference oops in regmap_name_read_file() when the regmap does not have a device associated with it. For example syscon regmaps retrieved with syscon_regmap_lookup_by_compatible() don't have a device. Signed-off-by: David Lechner --- v2 changes: - point out