_constraint_name(struct device *dev, ssize_t len = -ENODATA; struct powercap_zone_constraint *pconst; - if (!sscanf(dev_attr->attr.name, "constraint_%d_", &id)) + if (sscanf(dev_attr->attr.name, "constraint_%d_", &id) != 1) return -EINVAL; if (id >= power_zone->const_id_cnt) return -EINVAL; -- 2.51.0[PATCH 6.12 104/119] powercap: fix sscanf() error return value handlingGreg Kroah-Hartman undefinedstable@vger.kernel.org undefined undefined undefined undefined undefined»w…š4