Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62368dad authored by Andreea-Cristina Bernat's avatar Andreea-Cristina Bernat Committed by Peter P Waskiewicz Jr
Browse files

/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: default avatarAndreea-Cristina Bernat <bernat.ada@gmail.com>
Signed-off-by: default avatarPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
parent 88469522
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -65,7 +65,9 @@ static ssize_t dgrp_class_pollrate_store(struct device *c,
					 struct device_attribute *attr,
					 struct device_attribute *attr,
					 const char *buf, size_t count)
					 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;
	return count;
}
}
static DEVICE_ATTR(pollrate, 0600, dgrp_class_pollrate_show,
static DEVICE_ATTR(pollrate, 0600, dgrp_class_pollrate_show,