diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-26 12:28:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-26 12:28:22 -0400 |
commit | 96d185c76584b285dbaf39e4399a9a690ce7aa6d (patch) | |
tree | 18fe9e8dc4ba0764e024fc534bf75b05d21af63e /drivers | |
parent | a94cc4e6c0a26a7c8f79a432ab2c89534aa674d5 (diff) | |
parent | 8adb4ca344b48bbbf87ca66fd07a2dd503619714 (diff) |
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
[S390] memory hotplug: only unassign assigned increments
[S390] Change default action from reipl to stop for on_restart
[S390] arch/s390/kernel/ipl.c: correct error detection check
[S390] drivers/s390/block/dasd_ioctl.c: add missing kfree
[S390] nss,initrd: kernel image and initrd must be in different segments
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/s390/block/dasd_ioctl.c | 10 | ||||
-rw-r--r-- | drivers/s390/char/sclp_cmd.c | 6 |
2 files changed, 11 insertions, 5 deletions
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c index eb4e034378cd..f1a2016829fc 100644 --- a/drivers/s390/block/dasd_ioctl.c +++ b/drivers/s390/block/dasd_ioctl.c | |||
@@ -249,6 +249,7 @@ static int dasd_ioctl_reset_profile(struct dasd_block *block) | |||
249 | static int dasd_ioctl_read_profile(struct dasd_block *block, void __user *argp) | 249 | static int dasd_ioctl_read_profile(struct dasd_block *block, void __user *argp) |
250 | { | 250 | { |
251 | struct dasd_profile_info_t *data; | 251 | struct dasd_profile_info_t *data; |
252 | int rc = 0; | ||
252 | 253 | ||
253 | data = kmalloc(sizeof(*data), GFP_KERNEL); | 254 | data = kmalloc(sizeof(*data), GFP_KERNEL); |
254 | if (!data) | 255 | if (!data) |
@@ -279,11 +280,14 @@ static int dasd_ioctl_read_profile(struct dasd_block *block, void __user *argp) | |||
279 | spin_unlock_bh(&block->profile.lock); | 280 | spin_unlock_bh(&block->profile.lock); |
280 | } else { | 281 | } else { |
281 | spin_unlock_bh(&block->profile.lock); | 282 | spin_unlock_bh(&block->profile.lock); |
282 | return -EIO; | 283 | rc = -EIO; |
284 | goto out; | ||
283 | } | 285 | } |
284 | if (copy_to_user(argp, data, sizeof(*data))) | 286 | if (copy_to_user(argp, data, sizeof(*data))) |
285 | return -EFAULT; | 287 | rc = -EFAULT; |
286 | return 0; | 288 | out: |
289 | kfree(data); | ||
290 | return rc; | ||
287 | } | 291 | } |
288 | #else | 292 | #else |
289 | static int dasd_ioctl_reset_profile(struct dasd_block *block) | 293 | static int dasd_ioctl_reset_profile(struct dasd_block *block) |
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c index be55fb2b1b1c..837e010299a8 100644 --- a/drivers/s390/char/sclp_cmd.c +++ b/drivers/s390/char/sclp_cmd.c | |||
@@ -383,8 +383,10 @@ static int sclp_attach_storage(u8 id) | |||
383 | switch (sccb->header.response_code) { | 383 | switch (sccb->header.response_code) { |
384 | case 0x0020: | 384 | case 0x0020: |
385 | set_bit(id, sclp_storage_ids); | 385 | set_bit(id, sclp_storage_ids); |
386 | for (i = 0; i < sccb->assigned; i++) | 386 | for (i = 0; i < sccb->assigned; i++) { |
387 | sclp_unassign_storage(sccb->entries[i] >> 16); | 387 | if (sccb->entries[i]) |
388 | sclp_unassign_storage(sccb->entries[i] >> 16); | ||
389 | } | ||
388 | break; | 390 | break; |
389 | default: | 391 | default: |
390 | rc = -EIO; | 392 | rc = -EIO; |