aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/dasd_fba.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/block/dasd_fba.c')
-rw-r--r--drivers/s390/block/dasd_fba.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c
index aee4656127f7..aa0c533423a5 100644
--- a/drivers/s390/block/dasd_fba.c
+++ b/drivers/s390/block/dasd_fba.c
@@ -139,7 +139,8 @@ dasd_fba_check_characteristics(struct dasd_device *device)
139 if (IS_ERR(block)) { 139 if (IS_ERR(block)) {
140 DEV_MESSAGE(KERN_WARNING, device, "%s", 140 DEV_MESSAGE(KERN_WARNING, device, "%s",
141 "could not allocate dasd block structure"); 141 "could not allocate dasd block structure");
142 kfree(device->private); 142 device->private = NULL;
143 kfree(private);
143 return PTR_ERR(block); 144 return PTR_ERR(block);
144 } 145 }
145 device->block = block; 146 device->block = block;
@@ -152,6 +153,10 @@ dasd_fba_check_characteristics(struct dasd_device *device)
152 DEV_MESSAGE(KERN_WARNING, device, 153 DEV_MESSAGE(KERN_WARNING, device,
153 "Read device characteristics returned error %d", 154 "Read device characteristics returned error %d",
154 rc); 155 rc);
156 device->block = NULL;
157 dasd_free_block(block);
158 device->private = NULL;
159 kfree(private);
155 return rc; 160 return rc;
156 } 161 }
157 162