[dahdi-commits] tzafrir: linux/trunk r10437 -	/linux/trunk/drivers/dahdi/xpp/xbus-core.c
    SVN commits to the DAHDI project 
    dahdi-commits at lists.digium.com
       
    Thu Jan 12 11:13:44 CST 2012
    
    
  
Author: tzafrir
Date: Thu Jan 12 11:13:41 2012
New Revision: 10437
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10437
Log:
xpp: style - kfree() is NULL safe
Signed-off-by: Oron Peled <oron.peled at xorcom.com>
Acked-By: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Modified:
    linux/trunk/drivers/dahdi/xpp/xbus-core.c
Modified: linux/trunk/drivers/dahdi/xpp/xbus-core.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xbus-core.c?view=diff&rev=10437&r1=10436&r2=10437
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xbus-core.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xbus-core.c Thu Jan 12 11:13:41 2012
@@ -940,8 +940,7 @@
 {
 	if (!xbus->ddev)
 		return;
-	if (xbus->ddev->devicetype)
-		kfree(xbus->ddev->devicetype);
+	kfree(xbus->ddev->devicetype);	/* NULL is safe */
 	xbus->ddev->devicetype = NULL;
 	xbus->ddev->location = NULL;
 	xbus->ddev->hardware_id = NULL;
    
    
More information about the dahdi-commits
mailing list