From ccaa35624e84640f50de9cdfbf0cef483dada746 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Thu, 12 Jan 2012 17:13:41 +0000 Subject: xpp: style - kfree() is NULL safe Signed-off-by: Oron Peled Acked-By: Tzafrir Cohen git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10437 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/xpp/xbus-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/dahdi/xpp/xbus-core.c b/drivers/dahdi/xpp/xbus-core.c index 1f60920..92ae121 100644 --- a/drivers/dahdi/xpp/xbus-core.c +++ b/drivers/dahdi/xpp/xbus-core.c @@ -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; -- cgit v1.2.3