summaryrefslogtreecommitdiff
path: root/drivers/mbmmodem
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-08-16 22:09:09 +0200
committerMarcel Holtmann <marcel@holtmann.org>2010-08-16 22:09:09 +0200
commite4e215e88b4865d7f6fc0ff3f4fa0341e13c981e (patch)
tree87599015ea78e3d6fc51414c1007851044c4477d /drivers/mbmmodem
parentf284f3542b9a36d8182db9e32acece9ea023a836 (diff)
mbmmodem: Remove useless NULL checks before g_free
Diffstat (limited to 'drivers/mbmmodem')
-rw-r--r--drivers/mbmmodem/gprs-context.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/mbmmodem/gprs-context.c b/drivers/mbmmodem/gprs-context.c
index c309fe42..6cda0c51 100644
--- a/drivers/mbmmodem/gprs-context.c
+++ b/drivers/mbmmodem/gprs-context.c
@@ -324,8 +324,7 @@ static void mbm_cgdcont_cb(gboolean ok, GAtResult *result, gpointer user_data)
mbm_enap_up_cb, ncbd, g_free) > 0)
return;
- if (ncbd)
- g_free(ncbd);
+ g_free(ncbd);
gcd->active_context = 0;
@@ -371,8 +370,7 @@ static void mbm_gprs_activate_primary(struct ofono_gprs_context *gc,
return;
error:
- if (cbd)
- g_free(cbd);
+ g_free(cbd);
CALLBACK_WITH_FAILURE(cb, NULL, 0, NULL, NULL, NULL, NULL, data);
}
@@ -394,8 +392,7 @@ static void mbm_gprs_deactivate_primary(struct ofono_gprs_context *gc,
return;
error:
- if (cbd)
- g_free(cbd);
+ g_free(cbd);
CALLBACK_WITH_FAILURE(cb, data);
}