colead-slm: fix sloppy driver context handling
This commit is contained in:
parent
f18297a5fd
commit
538ac9a91e
|
@ -57,7 +57,9 @@ static int clear_instances(void)
|
|||
struct dev_context *devc;
|
||||
GSList *l;
|
||||
|
||||
drvc = di->priv;
|
||||
if (!(drvc = di->priv))
|
||||
return SR_OK;
|
||||
|
||||
for (l = drvc->instances; l; l = l->next) {
|
||||
if (!(sdi = l->data))
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue