rigol-ds: Drop unneeded check of g_strdup_printf() result.

This commit is contained in:
Uwe Hermann 2015-04-08 19:14:05 +02:00
parent 2d31e8bcbd
commit eac0c61327
1 changed files with 2 additions and 4 deletions

View File

@ -353,8 +353,7 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
model->analog_channels);
for (i = 0; i < model->analog_channels; i++) {
if (!(channel_name = g_strdup_printf("CH%d", i + 1)))
return NULL;
channel_name = g_strdup_printf("CH%d", i + 1);
ch = sr_channel_new(sdi, i, SR_CHANNEL_ANALOG, TRUE, channel_name);
devc->analog_groups[i] = g_malloc0(sizeof(struct sr_channel_group));
@ -369,8 +368,7 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
devc->digital_group = g_malloc0(sizeof(struct sr_channel_group));
for (i = 0; i < ARRAY_SIZE(devc->digital_channels); i++) {
if (!(channel_name = g_strdup_printf("D%d", i)))
return NULL;
channel_name = g_strdup_printf("D%d", i);
ch = sr_channel_new(sdi, i, SR_CHANNEL_LOGIC, TRUE, channel_name);
g_free(channel_name);
devc->digital_group->channels = g_slist_append(