diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2008-07-17 11:16:43 -0400 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-07-17 11:22:08 -0400 |
commit | 7337194f708bac977511c7890d7038ded187041a (patch) | |
tree | bf7bb40487f374b00403f92f029167f6f0bed0d1 /drivers/s390/block/dasd_fba.c | |
parent | 626f311737770f0fb5c09a6da2ea795a559aa42a (diff) |
[S390] dasd: Fix cleanup in dasd_{fba,diag}_check_characteristics().
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd_fba.c')
-rw-r--r-- | drivers/s390/block/dasd_fba.c | 7 |
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 | ||