return std_init(sr_ctx, di, LOG_PREFIX);
}
-static struct dev_context * beaglelogic_devc_alloc(void)
+static struct dev_context *beaglelogic_devc_alloc(void)
{
struct dev_context *devc;
- /* Allocate zeroed structure */
- devc = g_try_malloc0(sizeof(*devc));
+ devc = g_malloc0(sizeof(struct dev_context));
/* Default non-zero values (if any) */
devc->fd = -1;
/* Fill the channels */
for (i = 0; i < maxch; i++) {
- if (!(ch = sr_channel_new(i, SR_CHANNEL_LOGIC, TRUE,
- beaglelogic_channel_names[i])))
- return NULL;
+ ch = sr_channel_new(i, SR_CHANNEL_LOGIC, TRUE,
+ beaglelogic_channel_names[i]);
sdi->channels = g_slist_append(sdi->channels, ch);
}