module: fix NULL pointer dereference in find_symbol()
From: Jiri Kosina <jkosina@suse.cz>

The patch that introduces each_symbol() iterator forgets to
test the NULL value of the output parameters (which the original
code did).

This patch restores the correct checks.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
 kernel/module.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kernel/module.c b/kernel/module.c
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -303,8 +303,10 @@ static unsigned long find_symbol(const c
 	fsa.warn = warn;
 
 	if (each_symbol(find_symbol_in_section, &fsa)) {
-		*owner = fsa.owner;
-		*crc = fsa.crc;
+		if (owner)
+			*owner = fsa.owner;
+		if (crc)
+			*crc = fsa.crc;
 		return fsa.value;
 	}
 
