]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (scmi) handle absence of few types of sensors
authorSudeep Holla <Sudeep.Holla@arm.com>
Fri, 6 Apr 2018 15:30:47 +0000 (16:30 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 23 Apr 2018 02:39:55 +0000 (19:39 -0700)
commit8811a7d49f098c5af2f94c2ab4a13b5dade885cc
tree5a4e4154db998158f9c5945fac88b19ffd2e711f
parent973749235e9a82e6427f10ff5051544290b05216
hwmon: (scmi) handle absence of few types of sensors

Currently the loop checks for non-zero count of sensors for each type
of sensors which is completely wrong. It also results in aborting the
registration of sensors if one or more types of sensors are completely
not supported by the platform SCMI firmware.

This patch fixes the issue by continue to loop and skiping sensor types
that are not present.

Fixes: b73651a9ac31 ("hwmon: add support for sensors exported via ARM SCMI")
Reported-by: Jim Quinlan <james.quinlan@broadcom.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: linux-hwmon@vger.kernel.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/scmi-hwmon.c