From: Dan Carpenter Date: Thu, 30 Jan 2014 11:49:43 +0000 (+0300) Subject: hwrng: cleanup in hwrng_register() X-Git-Tag: v3.15-rc1~111^2~49 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d167b6e1fb8ad386b17485ca88804d14f1695805;p=pandora-kernel.git hwrng: cleanup in hwrng_register() My static checker complains that: drivers/char/hw_random/core.c:341 hwrng_register() warn: we tested 'old_rng' before and it was 'false' The problem is that sometimes we test "if (!old_rng)" and sometimes we test "if (must_register_misc)". The static checker knows they are equivalent but a human being reading the code could easily be confused. I have simplified the code by removing the "must_register_misc" variable and I have removed the redundant check on "if (!old_rng)". Signed-off-by: Dan Carpenter Reviewed-by: Rusty Russell Signed-off-by: Herbert Xu --- Reading git-diff-tree failed