Message ID | 20220707162313.869213-2-frank.heimes@canonical.com |
---|---|
State | New |
Headers | show |
Series | Kernel oops while removing device from cio_ignore list (LP: 1980951) | expand |
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index c27809792609..ce9e7517430f 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c @@ -792,10 +792,13 @@ static int __unset_online(struct device *dev, void *data) { struct idset *set = data; struct subchannel *sch = to_subchannel(dev); - struct ccw_device *cdev = sch_get_cdev(sch); + struct ccw_device *cdev; - if (cdev && cdev->online) - idset_sch_del(set, sch->schid); + if (sch->st == SUBCHANNEL_TYPE_IO) { + cdev = sch_get_cdev(sch); + if (cdev && cdev->online) + idset_sch_del(set, sch->schid); + } return 0; }