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-Url: https://git.stricted.de/?a=commitdiff_plain;h=578a0ab8dd02f1de4b3b0e7b227ff78ae54fa4e1;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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 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;