Commit 9d677cf6 authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman

greybus: Add FIXME warnings for possible NULL dereferences

Signed-off-by: default avatarBill Pemberton <wfp5p@worldbroken.com>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 4e2b07e9
...@@ -742,6 +742,7 @@ int gb_operation_response_send(struct gb_operation *operation, int errno) ...@@ -742,6 +742,7 @@ int gb_operation_response_send(struct gb_operation *operation, int errno)
} }
} }
/* FIXME operation->response could still be NULL here */
/* Fill in the response header and send it */ /* Fill in the response header and send it */
operation->response->header->result = gb_operation_errno_map(errno); operation->response->header->result = gb_operation_errno_map(errno);
......
...@@ -188,6 +188,9 @@ void gb_protocol_put(struct gb_protocol *protocol) ...@@ -188,6 +188,9 @@ void gb_protocol_put(struct gb_protocol *protocol)
if (protocol) if (protocol)
WARN_ON(!protocol_count); WARN_ON(!protocol_count);
else else
/* FIXME a different message is needed since this one
* will result in a NULL dereference
*/
pr_err("protocol id %hhu version %hhu.%hhu not found\n", pr_err("protocol id %hhu version %hhu.%hhu not found\n",
protocol->id, major, minor); protocol->id, major, minor);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment