aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/chp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/cio/chp.c')
-rw-r--r--drivers/s390/cio/chp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/s390/cio/chp.c b/drivers/s390/cio/chp.c
index 3d49919a4517..42c1f4659adb 100644
--- a/drivers/s390/cio/chp.c
+++ b/drivers/s390/cio/chp.c
@@ -140,9 +140,11 @@ static ssize_t chp_measurement_chars_read(struct kobject *kobj,
140 char *buf, loff_t off, size_t count) 140 char *buf, loff_t off, size_t count)
141{ 141{
142 struct channel_path *chp; 142 struct channel_path *chp;
143 struct device *device;
143 unsigned int size; 144 unsigned int size;
144 145
145 chp = to_channelpath(container_of(kobj, struct device, kobj)); 146 device = container_of(kobj, struct device, kobj);
147 chp = to_channelpath(device);
146 if (!chp->cmg_chars) 148 if (!chp->cmg_chars)
147 return 0; 149 return 0;
148 150
@@ -193,9 +195,11 @@ static ssize_t chp_measurement_read(struct kobject *kobj,
193{ 195{
194 struct channel_path *chp; 196 struct channel_path *chp;
195 struct channel_subsystem *css; 197 struct channel_subsystem *css;
198 struct device *device;
196 unsigned int size; 199 unsigned int size;
197 200
198 chp = to_channelpath(container_of(kobj, struct device, kobj)); 201 device = container_of(kobj, struct device, kobj);
202 chp = to_channelpath(device);
199 css = to_css(chp->dev.parent); 203 css = to_css(chp->dev.parent);
200 204
201 size = sizeof(struct cmg_entry); 205 size = sizeof(struct cmg_entry);