From: Bryan O'Donoghue Date: Fri, 11 Dec 2015 13:46:50 +0000 (+0000) Subject: greybus: loopback: Drop NULL check on container_of pointer X-Git-Tag: v5.15~12752^2~378^2~21^2~931 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=578a0ab8dd02f1de4b3b0e7b227ff78ae54fa4e1;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Bryan O'Donoghue Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c index 68372918..0828772 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;