mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 04:21:09 -04:00
irqchip: Use IS_ERR_OR_NULL() instead of NULL and IS_ERR() checks
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a open coded NULL pointer check. Change generated with coccinelle. To: Marc Zyngier <maz@kernel.org> To: Thomas Gleixner <tglx@kernel.org> To: Andrew Lunn <andrew@lunn.ch> To: Gregory Clement <gregory.clement@bootlin.com> To: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Philipp Hahn <phahn-oss@avm.de> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Link: https://patch.msgid.link/20260310-b4-is_err_or_null-v1-39-bd63b656022d@avm.de
This commit is contained in:
committed by
Thomas Gleixner
parent
7585a27644
commit
d50590de0c
@@ -2252,7 +2252,7 @@ static int __init gic_of_init(struct device_node *node, struct device_node *pare
|
||||
|
||||
out_unmap_rdist:
|
||||
for (i = 0; i < nr_redist_regions; i++)
|
||||
if (rdist_regs[i].redist_base && !IS_ERR(rdist_regs[i].redist_base))
|
||||
if (!IS_ERR_OR_NULL(rdist_regs[i].redist_base))
|
||||
iounmap(rdist_regs[i].redist_base);
|
||||
kfree(rdist_regs);
|
||||
out_unmap_dist:
|
||||
|
||||
@@ -217,7 +217,7 @@ static int __init mvebu_odmi_init(struct device_node *node,
|
||||
for (i = 0; i < odmis_count; i++) {
|
||||
struct odmi_data *odmi = &odmis[i];
|
||||
|
||||
if (odmi->base && !IS_ERR(odmi->base))
|
||||
if (!IS_ERR_OR_NULL(odmi->base))
|
||||
iounmap(odmis[i].base);
|
||||
}
|
||||
bitmap_free(odmis_bm);
|
||||
|
||||
Reference in New Issue
Block a user