]> git.proxmox.com Git - mirror_qemu.git/commit
hw/arm: Simplify memory_region_init_rom() calls
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 20 Nov 2023 12:36:49 +0000 (13:36 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 5 Jan 2024 15:20:15 +0000 (16:20 +0100)
commit419d8524a266ece5ea44e689174ab026df888d08
treec80a2080ef17c744749535bb7568f2e5c7118a0d
parent2198f5f0f2f3f5470a9e3c0c1431dec022bb67ad
hw/arm: Simplify memory_region_init_rom() calls

Mechanical change using the following coccinelle script:

@@
expression mr, owner, arg3, arg4, errp;
@@
-   memory_region_init_rom(mr, owner, arg3, arg4, &errp);
    if (
-       errp
+       !memory_region_init_rom(mr, owner, arg3, arg4, &errp)
    ) {
        ...
        return;
    }

and removing the local Error variable.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Message-Id: <20231120213301.24349-22-philmd@linaro.org>
hw/arm/fsl-imx25.c
hw/arm/fsl-imx31.c
hw/arm/fsl-imx6.c