Silently ignore zero pressure

Don't complain about them, they're just missing values

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Linus Torvalds 2011-09-02 14:06:26 -07:00
parent 9506c4bf0a
commit a5e4c7ffd1

View file

@ -227,6 +227,9 @@ static void pressure(char *buffer, void *_press)
switch (integer_or_float(buffer, &val)) {
case FLOAT:
/* Just ignore zero values */
if (!val.fp)
break;
switch (units.pressure) {
case BAR:
/* Assume mbar, but if it's really small, it's bar */