Deal with uninitialized drivers
This commit is contained in:
parent
c2fa697afa
commit
3a277f3b2b
5
std.c
5
std.c
|
@ -184,7 +184,10 @@ SR_PRIV int std_dev_clear(const struct sr_dev_driver *driver,
|
||||||
GSList *l;
|
GSList *l;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
drvc = driver->priv;
|
if (!(drvc = driver->priv))
|
||||||
|
/* Driver was never initialized, nothing to do. */
|
||||||
|
return SR_OK;
|
||||||
|
|
||||||
ret = SR_OK;
|
ret = SR_OK;
|
||||||
for (l = drvc->instances; l; l = l->next) {
|
for (l = drvc->instances; l; l = l->next) {
|
||||||
/* Log errors, but continue cleaning up the rest. */
|
/* Log errors, but continue cleaning up the rest. */
|
||||||
|
|
Loading…
Reference in New Issue