diff options
author | Bryan O'Donoghue | 2015-12-11 14:46:50 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2015-12-12 01:16:01 +0100 |
commit | 578a0ab8dd02f1de4b3b0e7b227ff78ae54fa4e1 (patch) | |
tree | aaf232aa2d3e9018f3f8dd53e8bed3138ac8018c /drivers/staging/greybus/loopback.c | |
parent | greybus: loopback: register a struct device. (diff) | |
download | kernel-qcow2-linux-578a0ab8dd02f1de4b3b0e7b227ff78ae54fa4e1.tar.gz kernel-qcow2-linux-578a0ab8dd02f1de4b3b0e7b227ff78ae54fa4e1.tar.xz kernel-qcow2-linux-578a0ab8dd02f1de4b3b0e7b227ff78ae54fa4e1.zip |
greybus: loopback: Drop NULL check on container_of pointer
container_of cannot return NULL and the pointer passed to this context uses
reference counter bumped inside a spinlock, so the base pointer will be
valid at this point.
Suggested-by: Johan Hovold <johan@hovoldconstulting.com>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/loopback.c')
-rw-r--r-- | drivers/staging/greybus/loopback.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c index 68372918f653..0828772fc901 100644 --- a/drivers/staging/greybus/loopback.c +++ b/drivers/staging/greybus/loopback.c @@ -526,9 +526,6 @@ static void gb_loopback_async_operation_work(struct work_struct *work) struct gb_loopback_async_operation *op_async; op_async = container_of(work, struct gb_loopback_async_operation, work); - if (!op_async) - return; - gb = op_async->gb; operation = op_async->operation; |