diff mbox

sata_fsl: Remove redundant NULL check before kfree

Message ID 1361747647-29539-1-git-send-email-s.syam@samsung.com
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Syam Sidhardhan Feb. 24, 2013, 11:14 p.m. UTC
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(-)

Comments

Jeff Garzik March 4, 2013, 10:15 p.m. UTC | #1
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
diff mbox

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;
 }