diff options
author | James Bottomley <James.Bottomley@suse.de> | 2009-11-03 13:33:07 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-01-18 11:48:05 -0500 |
commit | e3deec090558d5cb5ffdc574e5560f3ed9723394 (patch) | |
tree | c76a5e26a3e08598ada0a2de34adcdf714aa7168 /include/scsi | |
parent | 534ef056db8a8fb6b9d50188d88ed5d1fbc66673 (diff) |
[SCSI] eliminate potential kmalloc failure in scsi_get_vpd_page()
The best way to fix this is to eliminate the intenal kmalloc() and
make the caller allocate the required amount of storage.
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/scsi_device.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 7c4449900c2..d80b6dbed1c 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -348,7 +348,8 @@ extern int scsi_mode_select(struct scsi_device *sdev, int pf, int sp, | |||
348 | struct scsi_sense_hdr *); | 348 | struct scsi_sense_hdr *); |
349 | extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout, | 349 | extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout, |
350 | int retries, struct scsi_sense_hdr *sshdr); | 350 | int retries, struct scsi_sense_hdr *sshdr); |
351 | extern unsigned char *scsi_get_vpd_page(struct scsi_device *, u8 page); | 351 | extern int scsi_get_vpd_page(struct scsi_device *, u8 page, unsigned char *buf, |
352 | int buf_len); | ||
352 | extern int scsi_device_set_state(struct scsi_device *sdev, | 353 | extern int scsi_device_set_state(struct scsi_device *sdev, |
353 | enum scsi_device_state state); | 354 | enum scsi_device_state state); |
354 | extern struct scsi_event *sdev_evt_alloc(enum scsi_device_event evt_type, | 355 | extern struct scsi_event *sdev_evt_alloc(enum scsi_device_event evt_type, |