On 11/21/23 07:32, Philippe Mathieu-Daudé wrote:
Mechanical change using the following coccinelle script:

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

and removing the local Error variable.

Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
  hw/nvram/nrf51_nvm.c | 7 ++-----
  1 file changed, 2 insertions(+), 5 deletions(-)

Reviewed-by: Gavin Shan <gs...@redhat.com>


Reply via email to