From: Antonio Ospite Date: Wed, 10 Jun 2015 11:16:02 +0000 (+0200) Subject: am7xxx: use debug() instead of fatal() in add_new_device() X-Git-Tag: v0.1.6~13 X-Git-Url: https://git.ao2.it/libam7xxx.git/commitdiff_plain/61e5bc764f2b35c333b11e5421c2e2495923b321?ds=inline;hp=--cc am7xxx: use debug() instead of fatal() in add_new_device() We are guaranteed that ctx is non-null by a previous check. --- 61e5bc764f2b35c333b11e5421c2e2495923b321 diff --git a/src/am7xxx.c b/src/am7xxx.c index c18e202..dd69fc5 100644 --- a/src/am7xxx.c +++ b/src/am7xxx.c @@ -664,7 +664,7 @@ static am7xxx_device *add_new_device(am7xxx_context *ctx, new_device = malloc(sizeof(*new_device)); if (new_device == NULL) { - fatal("cannot allocate a new device (%s)\n", strerror(errno)); + debug(ctx, "cannot allocate a new device (%s)\n", strerror(errno)); return NULL; } memset(new_device, 0, sizeof(*new_device));