re: iio:magnetometer:mag3110: Scale factor missing for temperature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hello Peter Meerwald,

The patch f9279d3a8cc8: "iio:magnetometer:mag3110: Scale factor
missing for temperature" from Oct 1, 2014, leads to the following
                              ^^^^^^^^^^^
[ just the other day people were searching the internet for time
  travellers from the future ].

static checker warning:

	drivers/iio/magnetometer/mag3110.c:197 mag3110_read_raw()
	info: ignoring unreachable code.

drivers/iio/magnetometer/mag3110.c
   185          case IIO_CHAN_INFO_SCALE:
   186                  switch (chan->type) {
   187                  case IIO_MAGN:
   188                          *val = 0;
   189                          *val2 = 1000;
   190                          return IIO_VAL_INT_PLUS_MICRO;
   191                  case IIO_TEMP:
   192                          *val = 1000;
   193                          return IIO_VAL_INT;
   194                  default:
   195                          return -EINVAL;
   196                  }
   197                  return IIO_VAL_INT_PLUS_MICRO;
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Was -EINVAL intended here?

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]

Add to Google Powered by Linux