X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Ffx2lafw%2Fprotocol.c;h=1a623ec63de1698eb65e38193b6f1ca9d05c9855;hb=f57d8ffe66612a1fdc20ed09c222f8ea59bd84d4;hp=7e7b189116c565bd6b7f352de84e340bdb247fe6;hpb=aac29cc192ccf82b64e77b5e6b11b411da32deed;p=libsigrok.git diff --git a/src/hardware/fx2lafw/protocol.c b/src/hardware/fx2lafw/protocol.c index 7e7b1891..1a623ec6 100644 --- a/src/hardware/fx2lafw/protocol.c +++ b/src/hardware/fx2lafw/protocol.c @@ -299,11 +299,7 @@ SR_PRIV struct dev_context *fx2lafw_dev_new(void) { struct dev_context *devc; - if (!(devc = g_try_malloc(sizeof(struct dev_context)))) { - sr_err("Device context malloc failed."); - return NULL; - } - + devc = g_malloc0(sizeof(struct dev_context)); devc->profile = NULL; devc->fw_updated = 0; devc->cur_samplerate = 0;