Commit c4875ebf authored by Mark Hounschell's avatar Mark Hounschell Committed by Greg Kroah-Hartman

staging: dgap: fix checkpatch warning on sscanf usage

This patch fixes a checkpatch warning for not checking
the return value of sscanf.
Signed-off-by: default avatarMark Hounschell <markh@compro.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c96f565e
...@@ -6017,7 +6017,8 @@ static ssize_t dgap_driver_pollrate_show(struct device_driver *ddp, char *buf) ...@@ -6017,7 +6017,8 @@ static ssize_t dgap_driver_pollrate_show(struct device_driver *ddp, char *buf)
static ssize_t dgap_driver_pollrate_store(struct device_driver *ddp, const char *buf, size_t count) static ssize_t dgap_driver_pollrate_store(struct device_driver *ddp, const char *buf, size_t count)
{ {
sscanf(buf, "%d\n", &dgap_poll_tick); if (sscanf(buf, "%d\n", &dgap_poll_tick) != 1)
return -EINVAL;
return count; return count;
} }
static DRIVER_ATTR(pollrate, (S_IRUSR | S_IWUSR), dgap_driver_pollrate_show, dgap_driver_pollrate_store); static DRIVER_ATTR(pollrate, (S_IRUSR | S_IWUSR), dgap_driver_pollrate_show, dgap_driver_pollrate_store);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment