From: Bill Pemberton Date: Fri, 16 Jan 2015 02:18:27 +0000 (-0500) Subject: greybus: Add FIXME warnings for possible NULL dereferences X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9d677cf604212313f41097e2f542e1923d717086;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git greybus: Add FIXME warnings for possible NULL dereferences Signed-off-by: Bill Pemberton Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c index 44cfd5057e71..f014906c0259 100644 --- a/drivers/staging/greybus/operation.c +++ b/drivers/staging/greybus/operation.c @@ -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); diff --git a/drivers/staging/greybus/protocol.c b/drivers/staging/greybus/protocol.c index 562401d77d6d..b8ae70799f81 100644 --- a/drivers/staging/greybus/protocol.c +++ b/drivers/staging/greybus/protocol.c @@ -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); }