xpp: style - kfree() is NULL safe

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-By: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10437 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
Oron Peled
2012-01-12 17:13:41 +00:00
committed by Tzafrir Cohen
parent 9e541045d9
commit 2f03aa8bcb

View File

@@ -940,8 +940,7 @@ static void xbus_free_ddev(xbus_t *xbus)
{
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;