Skip to content

Commit

Permalink
thermal: Fix test of unsigned in thermal_cooling_device_cur_state_sto…
Browse files Browse the repository at this point in the history
…re()

state is unsigned long so the test did not work.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Roel Kluin authored and Len Brown committed Dec 16, 2009
1 parent 13c4115 commit edb9491
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/thermal/thermal_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ thermal_cooling_device_cur_state_store(struct device *dev,
if (!sscanf(buf, "%ld\n", &state))
return -EINVAL;

if (state < 0)
if ((long)state < 0)
return -EINVAL;

result = cdev->ops->set_cur_state(cdev, state);
Expand Down

0 comments on commit edb9491

Please sign in to comment.