summaryrefslogtreecommitdiffstats
path: root/drivers/staging/fbtft
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2017-01-19 12:45:43 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-19 12:50:27 +0100
commit09142c17daed255710bd4d9813d1f89f551a8e10 (patch)
tree2b1d7cba77aa5324bc1528a38e2f53aee0895d8b /drivers/staging/fbtft
parent7c3eaadd0209fe21f331600ea2d904c3a0e9b287 (diff)
downloadblackbird-op-linux-09142c17daed255710bd4d9813d1f89f551a8e10.tar.gz
blackbird-op-linux-09142c17daed255710bd4d9813d1f89f551a8e10.zip
staging: fbtft: propagate error code from kstrto*()
kstrto*() functions return proper error code. Do propogate it to the user. Acked-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fbtft')
-rw-r--r--drivers/staging/fbtft/fbtft-sysfs.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/staging/fbtft/fbtft-sysfs.c b/drivers/staging/fbtft/fbtft-sysfs.c
index 8d8bd12b90a1..5922f1b6d8d6 100644
--- a/drivers/staging/fbtft/fbtft-sysfs.c
+++ b/drivers/staging/fbtft/fbtft-sysfs.c
@@ -4,7 +4,6 @@
static int get_next_ulong(char **str_p, unsigned long *val, char *sep, int base)
{
char *p_val;
- int ret;
if (!str_p || !(*str_p))
return -EINVAL;
@@ -14,11 +13,7 @@ static int get_next_ulong(char **str_p, unsigned long *val, char *sep, int base)
if (!p_val)
return -EINVAL;
- ret = kstrtoul(p_val, base, val);
- if (ret)
- return -EINVAL;
-
- return 0;
+ return kstrtoul(p_val, base, val);
}
int fbtft_gamma_parse_str(struct fbtft_par *par, unsigned long *curves,
OpenPOWER on IntegriCloud