diff options
author | Tony Lindgren <tony@atomide.com> | 2010-03-01 17:19:05 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-03-01 17:19:05 -0500 |
commit | d702d12167a2c05a346f49aac7a311d597762495 (patch) | |
tree | baae42c299cce34d6df24b5d01f8b1d0b481bd9a /drivers/scsi/ses.c | |
parent | 9418c65f9bd861d0f7e39aab9cfb3aa6f2275d11 (diff) | |
parent | ac0f6f927db539e03e1f3f61bcd4ed57d5cde7a9 (diff) |
Merge with mainline to remove plat-omap/Kconfig conflict
Conflicts:
arch/arm/plat-omap/Kconfig
Diffstat (limited to 'drivers/scsi/ses.c')
-rw-r--r-- | drivers/scsi/ses.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c index 55b034b72708..1d7a8780e00c 100644 --- a/drivers/scsi/ses.c +++ b/drivers/scsi/ses.c | |||
@@ -448,13 +448,17 @@ static void ses_match_to_enclosure(struct enclosure_device *edev, | |||
448 | .addr = 0, | 448 | .addr = 0, |
449 | }; | 449 | }; |
450 | 450 | ||
451 | buf = scsi_get_vpd_page(sdev, 0x83); | 451 | buf = kmalloc(INIT_ALLOC_SIZE, GFP_KERNEL); |
452 | if (!buf) | 452 | if (!buf || scsi_get_vpd_page(sdev, 0x83, buf, INIT_ALLOC_SIZE)) |
453 | return; | 453 | goto free; |
454 | 454 | ||
455 | ses_enclosure_data_process(edev, to_scsi_device(edev->edev.parent), 0); | 455 | ses_enclosure_data_process(edev, to_scsi_device(edev->edev.parent), 0); |
456 | 456 | ||
457 | vpd_len = ((buf[2] << 8) | buf[3]) + 4; | 457 | vpd_len = ((buf[2] << 8) | buf[3]) + 4; |
458 | kfree(buf); | ||
459 | buf = kmalloc(vpd_len, GFP_KERNEL); | ||
460 | if (!buf ||scsi_get_vpd_page(sdev, 0x83, buf, vpd_len)) | ||
461 | goto free; | ||
458 | 462 | ||
459 | desc = buf + 4; | 463 | desc = buf + 4; |
460 | while (desc < buf + vpd_len) { | 464 | while (desc < buf + vpd_len) { |