lkml.org 
[lkml]   [2019]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subjectrandom: 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@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
\
 
 \ /
  Last update: 2019-02-15 22:49    [W:0.027 / U:0.968 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site