[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAFArEyVmxmF1=uymN82m4j_2XGOdb+LoDqgU7773Edu09KLLpQ@mail.gmail.com>
Date: Fri, 15 Feb 2019 13:47:07 -0800
From: Sultan Alsawaf <sultan@...neltoast.com>
To: tytso@....edu
Cc: linux-kernel@...r.kernel.org
Subject: random: remove no-op BUG_ON
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 <sultan@...neltoast.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
Powered by blists - more mailing lists