* random: remove no-op BUG_ON
@ 2019-02-15 21:47 Sultan Alsawaf
0 siblings, 0 replies; only message in thread
From: Sultan Alsawaf @ 2019-02-15 21:47 UTC (permalink / raw)
To: tytso; +Cc: linux-kernel
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@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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-02-15 21:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-15 21:47 random: remove no-op BUG_ON Sultan Alsawaf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).