Hello Vitaly Kuznetsov,
The patch 11bc3a5fa91f: "Drivers: hv: kvp: convert to
hv_utils_transport" from Apr 11, 2015, leads to the following static
checker warning:
drivers/hv/hv_kvp.c:356 kvp_send_key()
error: potential null dereference 'message'. (kzalloc returns null)
drivers/hv/hv_kvp.c
351 /* The transaction state is wrong. */
352 if (kvp_transaction.state != HVUTIL_HOSTMSG_RECEIVED)
353 return;
354
355 message = kzalloc(sizeof(*message), GFP_KERNEL);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The patch accidentally removes the NULL check on allocation failure.
356 message->kvp_hdr.operation = operation;
357 message->kvp_hdr.pool = pool;
358 in_msg = kvp_transaction.kvp_msg;
359
regards,
dan carpenter
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel