Skip to contentSkip to conversation

Staging: crystalhd: remove an unneeded NULL check

PATCH New Dan Carpenter 1 participant 1 message May 30, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: crystalhd: remove an unneeded NULL check

We already established earlier in the function that "temp" is non-NULL. We also don't need to set to NULL because it's a stack variable an we return immediately.

drivers/staging/crystalhd/crystalhd_lnx.c +1 -4
index 284b61f..c1f6163 100644
@@ -255,10 +255,7 @@ static int chd_dec_api_cmd(struct crystalhd_adp *adp, unsigned long ua,
 		rc = chd_dec_proc_user_data(adp, temp, ua, 1);
 	}
 
-	if (temp) {
-		chd_dec_free_iodata(adp, temp, 0);
-		temp = NULL;
-	}
+	chd_dec_free_iodata(adp, temp, 0);
 
 	return rc;
 }