aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nvmem/core.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-09 03:02:35 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-09 03:02:35 -0400
commit1236d6bb6e19fc72ffc6bbcdeb1bfefe450e54ee (patch)
tree47da3feee8e263e8c9352c85cf518e624be3c211 /drivers/nvmem/core.c
parent750b1a6894ecc9b178c6e3d0a1170122971b2036 (diff)
parent8a5776a5f49812d29fe4b2d0a2d71675c3facf3f (diff)
Merge 4.14-rc4 into staging-next
We want the staging/iio fixes in here as well to handle merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvmem/core.c')
-rw-r--r--drivers/nvmem/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index de54c7f5048a..d12e5de78e70 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -135,7 +135,7 @@ static ssize_t bin_attr_nvmem_write(struct file *filp, struct kobject *kobj,
135 135
136 /* Stop the user from writing */ 136 /* Stop the user from writing */
137 if (pos >= nvmem->size) 137 if (pos >= nvmem->size)
138 return 0; 138 return -EFBIG;
139 139
140 if (count < nvmem->word_size) 140 if (count < nvmem->word_size)
141 return -EINVAL; 141 return -EINVAL;
@@ -789,6 +789,7 @@ struct nvmem_cell *of_nvmem_cell_get(struct device_node *np,
789 return ERR_PTR(-EINVAL); 789 return ERR_PTR(-EINVAL);
790 790
791 nvmem = __nvmem_device_get(nvmem_np, NULL, NULL); 791 nvmem = __nvmem_device_get(nvmem_np, NULL, NULL);
792 of_node_put(nvmem_np);
792 if (IS_ERR(nvmem)) 793 if (IS_ERR(nvmem))
793 return ERR_CAST(nvmem); 794 return ERR_CAST(nvmem);
794 795