Skip to content

Commit

Permalink
greybus: Add FIXME warnings for possible NULL dereferences
Browse files Browse the repository at this point in the history
Signed-off-by: Bill Pemberton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
wfp5p authored and gregkh committed Jan 16, 2015
1 parent 4e2b07e commit 9d677cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/staging/greybus/operation.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
operation->response->header->result = gb_operation_errno_map(errno);

Expand Down
3 changes: 3 additions & 0 deletions drivers/staging/greybus/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ void gb_protocol_put(struct gb_protocol *protocol)
if (protocol)
WARN_ON(!protocol_count);
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",
protocol->id, major, minor);
}

0 comments on commit 9d677cf

Please sign in to comment.