Re: [PATCH 1/2] drivers: thermal: tsens: fix wrong check for tzd in irq handlers

From: Matthias Kaehlcke
Date: Tue Sep 07 2021 - 16:38:39 EST


On Sun, Sep 05, 2021 at 07:47:07PM +0200, Ansuel Smith wrote:
> Some device can have some thermal sensor disabled from the factory. The
> current 2 irq handler functions check all the sensor by default and the
> check if the sensor was actually registered is wrong. The tzd is
> actually never set if the registration fail hence the IS_ERR check is
> wrong.

Indeed, tsens_register() doesn't assign ->tzd when the registration of
the sensor fails.

> Signed-off-by: Ansuel Smith <ansuelsmth@xxxxxxxxx>

Reviewed-by: Matthias Kaehlcke <mka@xxxxxxxxxxxx>