提交 62368dad 编写于 作者: A Andreea-Cristina Bernat 提交者: Peter P Waskiewicz Jr

/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: NAndreea-Cristina Bernat <bernat.ada@gmail.com>
Signed-off-by: NPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
上级 88469522
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册