container_of simply does pointer arithmetic; it's not going to spit out NULL, so
this BUG_ON is unneeded.

Signed-off-by: Sultan Alsawaf <sul...@kerneltoast.com>
---
 drivers/char/random.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/random.c b/drivers/char/random.c
index 38c6d1af6..5ea9cf3d3 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1357,7 +1357,7 @@ static void push_to_pool(struct work_struct *work)
 {
  struct entropy_store *r = container_of(work, struct entropy_store,
        push_work);
- BUG_ON(!r);
+
  _xfer_secondary_pool(r, random_read_wakeup_bits/8);
  trace_push_to_pool(r->name, r->entropy_count >> ENTROPY_SHIFT,
     r->pull->entropy_count >> ENTROPY_SHIFT);
-- 
2.20.1

Reply via email to