Patchwork sata_fsl: Remove redundant NULL check before kfree

login
register
mail settings
Submitter Syam Sidhardhan
Date Feb. 24, 2013, 11:14 p.m.
Message ID <1361747647-29539-1-git-send-email-s.syam@samsung.com>
Download mbox | patch
Permalink /patch/222805/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Syam Sidhardhan - Feb. 24, 2013, 11:14 p.m.
kfree on NULL pointer is a no-op.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
---
 drivers/ata/sata_fsl.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Jeff Garzik - March 4, 2013, 10:15 p.m.
On 02/24/2013 06:14 PM, Syam Sidhardhan wrote:
> kfree on NULL pointer is a no-op.
>
> Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
> ---
>   drivers/ata/sata_fsl.c |    3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)

applied



--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 124b2c1..608f82f 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -1511,8 +1511,7 @@  error_exit_with_cleanup:
 
 	if (hcr_base)
 		iounmap(hcr_base);
-	if (host_priv)
-		kfree(host_priv);
+	kfree(host_priv);
 
 	return retval;
 }