OSDN Git Service

greybus: Add FIXME warnings for possible NULL dereferences
authorBill Pemberton <wfp5p@worldbroken.com>
Fri, 16 Jan 2015 02:18:27 +0000 (21:18 -0500)
committerGreg Kroah-Hartman <greg@kroah.com>
Fri, 16 Jan 2015 19:06:19 +0000 (11:06 -0800)
Signed-off-by: Bill Pemberton <wfp5p@worldbroken.com>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/operation.c
drivers/staging/greybus/protocol.c

index 44cfd50..f014906 100644 (file)
@@ -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);
 
index 562401d..b8ae707 100644 (file)
@@ -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);
 }