diff options
-rw-r--r-- | drivers/s390/cio/ccwgroup.c | 4 | ||||
-rw-r--r-- | drivers/s390/cio/cio.c | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c index e0ce65fca4e7..9a50f245774b 100644 --- a/drivers/s390/cio/ccwgroup.c +++ b/drivers/s390/cio/ccwgroup.c | |||
@@ -113,7 +113,8 @@ ccwgroup_release (struct device *dev) | |||
113 | 113 | ||
114 | for (i = 0; i < gdev->count; i++) { | 114 | for (i = 0; i < gdev->count; i++) { |
115 | if (gdev->cdev[i]) { | 115 | if (gdev->cdev[i]) { |
116 | dev_set_drvdata(&gdev->cdev[i]->dev, NULL); | 116 | if (dev_get_drvdata(&gdev->cdev[i]->dev) == gdev) |
117 | dev_set_drvdata(&gdev->cdev[i]->dev, NULL); | ||
117 | put_device(&gdev->cdev[i]->dev); | 118 | put_device(&gdev->cdev[i]->dev); |
118 | } | 119 | } |
119 | } | 120 | } |
@@ -296,6 +297,7 @@ error: | |||
296 | if (dev_get_drvdata(&gdev->cdev[i]->dev) == gdev) | 297 | if (dev_get_drvdata(&gdev->cdev[i]->dev) == gdev) |
297 | dev_set_drvdata(&gdev->cdev[i]->dev, NULL); | 298 | dev_set_drvdata(&gdev->cdev[i]->dev, NULL); |
298 | put_device(&gdev->cdev[i]->dev); | 299 | put_device(&gdev->cdev[i]->dev); |
300 | gdev->cdev[i] = NULL; | ||
299 | } | 301 | } |
300 | mutex_unlock(&gdev->reg_mutex); | 302 | mutex_unlock(&gdev->reg_mutex); |
301 | put_device(&gdev->dev); | 303 | put_device(&gdev->dev); |
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index 5954b905e3ca..326f4cc7f92c 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c | |||
@@ -174,6 +174,7 @@ cio_start_key (struct subchannel *sch, /* subchannel structure */ | |||
174 | CIO_TRACE_EVENT(4, sch->dev.bus_id); | 174 | CIO_TRACE_EVENT(4, sch->dev.bus_id); |
175 | 175 | ||
176 | orb = &to_io_private(sch)->orb; | 176 | orb = &to_io_private(sch)->orb; |
177 | memset(orb, 0, sizeof(union orb)); | ||
177 | /* sch is always under 2G. */ | 178 | /* sch is always under 2G. */ |
178 | orb->cmd.intparm = (u32)(addr_t)sch; | 179 | orb->cmd.intparm = (u32)(addr_t)sch; |
179 | orb->cmd.fmt = 1; | 180 | orb->cmd.fmt = 1; |