- for (l = device_instances; l; l = l->next) {
- if ((sdi = l->data) == NULL) {
- sr_warn("la8: %s: sdi was NULL, continuing", __func__);
+ for (l = dev_insts; l; l = l->next) {
+ if (!(sdi = l->data)) {
+ /* Log error, but continue cleaning up the rest. */
+ sr_err("la8: %s: sdi was NULL, continuing", __func__);
+ ret = SR_ERR_BUG;