m68k: sun3: add check for __pgd_alloc()

Add check for the return value of __pgd_alloc() in pgd_alloc() to prevent
null pointer dereference.

Link: https://lkml.kernel.org/r/[email protected]
Fixes: a9b3c355c2e6 ("asm-generic: pgalloc: provide generic __pgd_{alloc,free}")
Signed-off-by: Haoxiang Li <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Acked-by: Geert Uytterhoeven <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Kevin Brodsky <[email protected]>
Cc: Qi Zheng <[email protected]>
Cc: Sam Creasey <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
1 file changed