misc: ibmasm: Return error on error path
If ibmasm_event_buffer_init() or ibmasm_heartbeat_init() fails, then ibmasm_init_one() release all resources and return 0 on error path. The patch adds corresponding error for fails. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:

committed by
Jiri Kosina

parent
df47b246ed
commit
f403f85f53
@@ -155,7 +155,7 @@ int ibmasm_event_buffer_init(struct service_processor *sp)
|
||||
|
||||
buffer = kmalloc(sizeof(struct event_buffer), GFP_KERNEL);
|
||||
if (!buffer)
|
||||
return 1;
|
||||
return -ENOMEM;
|
||||
|
||||
buffer->next_index = 0;
|
||||
buffer->next_serial_number = 1;
|
||||
|
Reference in New Issue
Block a user