nds32: fix logic for module
commit1dfdf99106668679b0de5a62fd4f42c1a11c9445
authorGreentime Hu <greentime@andestech.com>
Wed, 18 Jul 2018 01:54:55 +0000 (18 09:54 +0800)
committerGreentime Hu <greentime@andestech.com>
Tue, 4 Sep 2018 06:45:15 +0000 (4 14:45 +0800)
tree213aaf362dec982cbcf3d397ff71f1d82d2eb22b
parent57361846b52bc686112da6ca5368d11210796804
nds32: fix logic for module

This bug is report by Dan Carpenter. We shall use ~loc_mask instead of
!loc_mask because we need to and(&) the bits of ~loc_mask.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: c9a4a8da6baa ("nds32: Loadable modules")
Signed-off-by: Greentime Hu <greentime@andestech.com>
arch/nds32/kernel/module.c