diff options
| author | Jeff Garzik <jgarzik@pretzel.yyz.us> | 2005-06-26 23:38:58 -0400 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-26 23:38:58 -0400 |
| commit | 5696c1944a33b4434a9a1ebb6383b906afd43a10 (patch) | |
| tree | 16fbe6ba431bcf949ee8645510b0c2fd39b5810f /drivers/misc/ibmasm/dot_command.c | |
| parent | 66b04a80eea60cabf9d89fd34deb3234a740052f (diff) | |
| parent | 020f46a39eb7b99a575b9f4d105fce2b142acdf1 (diff) | |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'drivers/misc/ibmasm/dot_command.c')
| -rw-r--r-- | drivers/misc/ibmasm/dot_command.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/misc/ibmasm/dot_command.c b/drivers/misc/ibmasm/dot_command.c index 478a8d898fc1..13c52f866e2e 100644 --- a/drivers/misc/ibmasm/dot_command.c +++ b/drivers/misc/ibmasm/dot_command.c | |||
| @@ -33,7 +33,13 @@ void ibmasm_receive_message(struct service_processor *sp, void *message, int mes | |||
| 33 | u32 size; | 33 | u32 size; |
| 34 | struct dot_command_header *header = (struct dot_command_header *)message; | 34 | struct dot_command_header *header = (struct dot_command_header *)message; |
| 35 | 35 | ||
| 36 | if (message_size == 0) | ||
| 37 | return; | ||
| 38 | |||
| 36 | size = get_dot_command_size(message); | 39 | size = get_dot_command_size(message); |
| 40 | if (size == 0) | ||
| 41 | return; | ||
| 42 | |||
| 37 | if (size > message_size) | 43 | if (size > message_size) |
| 38 | size = message_size; | 44 | size = message_size; |
| 39 | 45 | ||
| @@ -67,7 +73,7 @@ int ibmasm_send_driver_vpd(struct service_processor *sp) | |||
| 67 | u8 *vpd_data; | 73 | u8 *vpd_data; |
| 68 | int result = 0; | 74 | int result = 0; |
| 69 | 75 | ||
| 70 | command = ibmasm_new_command(INIT_BUFFER_SIZE); | 76 | command = ibmasm_new_command(sp, INIT_BUFFER_SIZE); |
| 71 | if (command == NULL) | 77 | if (command == NULL) |
| 72 | return -ENOMEM; | 78 | return -ENOMEM; |
| 73 | 79 | ||
| @@ -121,7 +127,7 @@ int ibmasm_send_os_state(struct service_processor *sp, int os_state) | |||
| 121 | struct os_state_command *os_state_cmd; | 127 | struct os_state_command *os_state_cmd; |
| 122 | int result = 0; | 128 | int result = 0; |
| 123 | 129 | ||
| 124 | cmd = ibmasm_new_command(sizeof(struct os_state_command)); | 130 | cmd = ibmasm_new_command(sp, sizeof(struct os_state_command)); |
| 125 | if (cmd == NULL) | 131 | if (cmd == NULL) |
| 126 | return -ENOMEM; | 132 | return -ENOMEM; |
| 127 | 133 | ||
