chronovu-la8: Code cleanup.
This cleans up a warning generated by clang's static analyzer.
This commit is contained in:
parent
382cb19f29
commit
65c8d48f14
|
@ -142,6 +142,7 @@ static int add_device(int idx, int model, GSList **devices)
|
|||
*devices = g_slist_append(*devices, sdi);
|
||||
drvc->instances = g_slist_append(drvc->instances, sdi);
|
||||
|
||||
if (ret == SR_OK)
|
||||
return SR_OK;
|
||||
|
||||
err_free_dev_inst:
|
||||
|
@ -210,8 +211,6 @@ static int dev_open(struct sr_dev_inst *sdi)
|
|||
struct dev_context *devc;
|
||||
int ret;
|
||||
|
||||
ret = SR_ERR;
|
||||
|
||||
if (!(devc = sdi->priv))
|
||||
return SR_ERR_BUG;
|
||||
|
||||
|
@ -254,6 +253,7 @@ static int dev_open(struct sr_dev_inst *sdi)
|
|||
|
||||
sdi->status = SR_ST_ACTIVE;
|
||||
|
||||
if (ret == SR_OK)
|
||||
return SR_OK;
|
||||
|
||||
err_ftdi_free:
|
||||
|
|
Loading…
Reference in New Issue