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

Commit d244019e authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: gadget: f_serial: Use snprintf() instead of sprintf()"

parents c4673fe7 95c0bae7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -712,7 +712,8 @@ static struct configfs_item_operations serial_item_ops = {

static ssize_t f_serial_port_num_show(struct config_item *item, char *page)
{
	return sprintf(page, "%u\n", to_f_serial_opts(item)->port_num);
	return snprintf(page, PAGE_SIZE, "%u\n",
			to_f_serial_opts(item)->port_num);
}

CONFIGFS_ATTR_RO(f_serial_, port_num);