On Mon, 30 Jul 2012, Bjørn Mork wrote: > Lan Tianyu <tianyu.lan@xxxxxxxxx> writes: > > > - if (sscanf(buf, "%d", &config) != 1 || config < 0 || config > 1) > > + if (sscanf(buf, "%d", &val) != 1 || val < 0 || val > 1) > > return -EINVAL; > > Not directly related to this patch, but a question I started wondering > about recently: Is there some generic guideline wrt parsing boolean > flags in sysfs? If not, shouldn't there be? Agreed; this area is ripe for kernel janitors. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html