diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-16 09:04:54 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-16 09:04:54 +0200 |
commit | 83cf9cd6d50ed4f7e6ae265e80e38b235c792f5f (patch) | |
tree | 6016c386c321cd6a3e8575e01ed9f10834fc5081 /drivers/nvmem/core.c | |
parent | 34bcfdac8c92cc7971254ba5856afd12047c50b2 (diff) | |
parent | 9d3cce1e8b8561fed5f383d22a4d6949db4eadbe (diff) |
Merge 4.18-rc5 into char-misc-next
We want the char-misc fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvmem/core.c')
-rw-r--r-- | drivers/nvmem/core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index 34b71b1c69f4..aa1657831b70 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -934,6 +934,10 @@ struct nvmem_cell *nvmem_cell_get(struct device *dev, const char *cell_id) return cell; } + /* NULL cell_id only allowed for device tree; invalid otherwise */ + if (!cell_id) + return ERR_PTR(-EINVAL); + return nvmem_cell_get_from_list(cell_id); } EXPORT_SYMBOL_GPL(nvmem_cell_get); |