From: Dan Carpenter Date: Thu, 30 May 2013 08:00:34 +0000 (+0300) Subject: Staging: crystalhd: remove an unneeded NULL check X-Git-Tag: v3.11-rc1~158^2~322 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2a1afdbf20ef028d6361c2257b3fef51a8df8b36;p=platform%2Fkernel%2Flinux-stable.git 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. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/crystalhd/crystalhd_lnx.c b/drivers/staging/crystalhd/crystalhd_lnx.c index 284b61f..c1f6163 100644 --- a/drivers/staging/crystalhd/crystalhd_lnx.c +++ b/drivers/staging/crystalhd/crystalhd_lnx.c @@ -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; }