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 <redacted>
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;