summaryrefslogtreecommitdiff
path: root/drivers/thermal/tegra/soctherm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/thermal/tegra/soctherm.c')
-rw-r--r--drivers/thermal/tegra/soctherm.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c
index be829d6e131c..2b0417d7b754 100644
--- a/drivers/thermal/tegra/soctherm.c
+++ b/drivers/thermal/tegra/soctherm.c
@@ -223,10 +223,7 @@ static int thermtrip_program(struct device *dev,
int temp;
u32 r;
- if (!dev || !sg)
- return -EINVAL;
-
- if (!sg->thermtrip_threshold_mask)
+ if (!sg || !sg->thermtrip_threshold_mask)
return -EINVAL;
temp = enforce_temp_range(dev, trip_temp) / ts->soc->thresh_grain;