Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76c0295c authored by Martin Peres's avatar Martin Peres Committed by Ben Skeggs
Browse files

drm/nv40/therm: reserve negative temperatures for errors

parent ad40d73e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -102,6 +102,10 @@ nv40_temp_get(struct nouveau_therm *therm)
	core_temp = core_temp + sensor->offset_num / sensor->offset_den;
	core_temp = core_temp + sensor->offset_constant - 8;

	/* reserve negative temperatures for errors */
	if (core_temp < 0)
		core_temp = 0;

	return core_temp;
}