link-mso19: Drop unnecessary NULL check
sdi is allocated using g_malloc0() which can never fail, in addition to that sdi is already dereferenced before the check, which makes the check useless. So remove it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
27272a704d
commit
f1e93a951e
|
@ -192,15 +192,6 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
|||
sdi->vendor = g_strdup(manufacturer);
|
||||
sdi->model = g_strdup(product);
|
||||
sdi->version = g_strdup(hwrev);
|
||||
|
||||
if (!sdi) {
|
||||
sr_err("Unable to create device instance for %s",
|
||||
sysname);
|
||||
sr_dev_inst_free(sdi);
|
||||
g_free(devc);
|
||||
return devices;
|
||||
}
|
||||
|
||||
sdi->driver = di;
|
||||
sdi->priv = devc;
|
||||
|
||||
|
|
Loading…
Reference in New Issue