From 1fba81cc09bd3cd71ca43cd66ca7223217eaa054 Mon Sep 17 00:00:00 2001 From: Nicolin Chen Date: Tue, 5 Sep 2017 00:41:16 -0700 Subject: thermal: tegra: remove null check for dev pointer The dev pointer is going through a null check after a dereference. So this patch removes that useless check since the driver does not pass a null dev pointer in any case. Signed-off-by: Nicolin Chen Signed-off-by: Eduardo Valentin --- drivers/thermal/tegra/soctherm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/thermal/tegra/soctherm.c') diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c index 7d2db23d71a3..075db1de5e53 100644 --- a/drivers/thermal/tegra/soctherm.c +++ b/drivers/thermal/tegra/soctherm.c @@ -483,7 +483,7 @@ static int throttrip_program(struct device *dev, unsigned int throt; u32 r, reg_off; - if (!dev || !sg || !stc || !stc->init) + if (!sg || !stc || !stc->init) return -EINVAL; temp = enforce_temp_range(dev, trip_temp) / ts->soc->thresh_grain; -- cgit