summaryrefslogtreecommitdiff
path: root/drivers/nvmem
diff options
context:
space:
mode:
authorJerome Brunet <jbrunet@baylibre.com>2018-05-11 14:07:00 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-14 17:20:48 +0300
commita29a63bdaf6f45f534def493223f211297462bed (patch)
tree62531c3eecd45ed693260304dfcb221e4003e921 /drivers/nvmem
parent401488d121a4ec9dc3fd9637591cf0f3577c8ec2 (diff)
downloadlinux-a29a63bdaf6f45f534def493223f211297462bed.tar.xz
nvmem: meson-efuse: simplify read callback
Most of the code and variables in the read callback is not necessary. Keep only what is required. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvmem')
-rw-r--r--drivers/nvmem/meson-efuse.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/nvmem/meson-efuse.c b/drivers/nvmem/meson-efuse.c
index 2df9b0094f45..4623249dfd87 100644
--- a/drivers/nvmem/meson-efuse.c
+++ b/drivers/nvmem/meson-efuse.c
@@ -24,15 +24,8 @@
static int meson_efuse_read(void *context, unsigned int offset,
void *val, size_t bytes)
{
- u8 *buf = val;
- int ret;
-
- ret = meson_sm_call_read(buf, bytes, SM_EFUSE_READ, offset,
- bytes, 0, 0, 0);
- if (ret < 0)
- return ret;
-
- return 0;
+ return meson_sm_call_read((u8 *)val, bytes, SM_EFUSE_READ, offset,
+ bytes, 0, 0, 0);
}
static const struct of_device_id meson_efuse_match[] = {