Staging: crystalhd: remove an unneeded NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 30 May 2013 08:00:34 +0000 (11:00 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Jun 2013 19:26:18 +0000 (12:26 -0700)
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 <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/crystalhd/crystalhd_lnx.c

index 284b61f533761b0b24ee42948040f5f66175ff9c..c1f6163cdeb81b545bdbe592b8c871b9c5310ce1 100644 (file)
@@ -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;
 }