diff options
author | Andreea-Cristina Bernat <bernat.ada@gmail.com> | 2014-03-10 14:01:13 +0200 |
---|---|---|
committer | Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> | 2014-03-10 23:25:08 -0700 |
commit | 62368dad3dee31829fddf1c31d32fe515b8da7c2 (patch) | |
tree | 694ea7fde6c32b9cf9e1760a324bbd04855aeee0 /drivers/staging/dgrp | |
parent | 88469522bba62f5cf2b78a19dfd70b18ef8b6e50 (diff) |
/drivers/staging/dgrp: Fixed warning unchecked sscanf return value
This patch solves the warning: unchecked sscanf return value from the script
checkpatch.pl for the file dgrp_sysfs.c
Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Diffstat (limited to 'drivers/staging/dgrp')
-rw-r--r-- | drivers/staging/dgrp/dgrp_sysfs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/dgrp/dgrp_sysfs.c b/drivers/staging/dgrp/dgrp_sysfs.c index 9a18a2c9e73b..2f9345ff0abb 100644 --- a/drivers/staging/dgrp/dgrp_sysfs.c +++ b/drivers/staging/dgrp/dgrp_sysfs.c @@ -65,7 +65,9 @@ static ssize_t dgrp_class_pollrate_store(struct device *c, struct device_attribute *attr, const char *buf, size_t count) { - sscanf(buf, "0x%x\n", &dgrp_poll_tick); + if (sscanf(buf, "0x%x\n", &dgrp_poll_tick) != 1) + return -EINVAL; + return count; } static DEVICE_ATTR(pollrate, 0600, dgrp_class_pollrate_show, |