From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Noralf Trønnes" <noralf@tronnes.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org,
"Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>,
linux-kernel@vger.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v4 3/5] staging: fbtft: propagate error code from kstrto*()
Date: Thu, 19 Jan 2017 12:45:43 +0200 [thread overview]
Message-ID: <20170119104545.130561-4-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20170119104545.130561-1-andriy.shevchenko@linux.intel.com>
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>
---
drivers/staging/fbtft/fbtft-sysfs.c | 7 +------
1 file changed, 1 insertion(+), 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,
--
2.11.0
next prev parent reply other threads:[~2017-01-19 10:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-19 10:45 [PATCH v4 0/5] fbtft: make it work with DMA enabled SPI Andy Shevchenko
2017-01-19 10:45 ` [PATCH v4 1/5] staging: fbtft: convert fbtft_reset() to be non-atomic Andy Shevchenko
2017-01-19 10:45 ` [PATCH v4 2/5] staging: fbtft: remove custom DMA mapped buffer Andy Shevchenko
2017-01-19 10:45 ` Andy Shevchenko [this message]
2017-01-19 10:45 ` [PATCH v4 4/5] staging: fbtft: fb_ssd1306: Support smaller screen sizes Andy Shevchenko
2017-01-19 10:45 ` [PATCH v4 5/5] staging: fbtft: fb_ssd1306: Refactor write_vmem() Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170119104545.130561-4-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=noralf@tronnes.org \
--cc=thomas.petazzoni@free-electrons.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox