powerpc/maple: Fix comparing pointer to 0
Fixes coccicheck warning: arch/powerpc/platforms/maple/setup.c:232:15-16: WARNING comparing pointer to 0 Compare pointer-typed values to NULL rather than 0. Signed-off-by: Chen Zhou <chenzhou10@huawei.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200121013153.9937-1-chenzhou10@huawei.com
This commit is contained in:
parent
aff8c8242b
commit
1e3531982e
@ -232,7 +232,7 @@ static void __init maple_init_IRQ(void)
|
|||||||
root = of_find_node_by_path("/");
|
root = of_find_node_by_path("/");
|
||||||
naddr = of_n_addr_cells(root);
|
naddr = of_n_addr_cells(root);
|
||||||
opprop = of_get_property(root, "platform-open-pic", &opplen);
|
opprop = of_get_property(root, "platform-open-pic", &opplen);
|
||||||
if (opprop != 0) {
|
if (opprop) {
|
||||||
openpic_addr = of_read_number(opprop, naddr);
|
openpic_addr = of_read_number(opprop, naddr);
|
||||||
has_isus = (opplen > naddr);
|
has_isus = (opplen > naddr);
|
||||||
printk(KERN_DEBUG "OpenPIC addr: %lx, has ISUs: %d\n",
|
printk(KERN_DEBUG "OpenPIC addr: %lx, has ISUs: %d\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user