diff mbox series

[PATCH-for-9.0?,1/2] hw/misc/applesmc: Do not call DeviceReset() from DeviceRealize()

Message ID 20240408095217.57239-2-philmd@linaro.org
State Superseded
Headers show
Series hw/misc/applesmc: Fix memory leak | expand

Commit Message

Philippe Mathieu-Daudé April 8, 2024, 9:52 a.m. UTC
QDev core layer always call DeviceReset() after DeviceRealize(),
no need to do it manually. Remove the extra call.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/misc/applesmc.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Peter Maydell April 8, 2024, 10:30 a.m. UTC | #1
On Mon, 8 Apr 2024 at 10:52, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> QDev core layer always call DeviceReset() after DeviceRealize(),
> no need to do it manually. Remove the extra call.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  hw/misc/applesmc.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/hw/misc/applesmc.c b/hw/misc/applesmc.c
> index 72300d0cbc..8e65816da6 100644
> --- a/hw/misc/applesmc.c
> +++ b/hw/misc/applesmc.c
> @@ -342,7 +342,6 @@ static void applesmc_isa_realize(DeviceState *dev, Error **errp)
>      }
>
>      QLIST_INIT(&s->data_def);
> -    qdev_applesmc_isa_reset(dev);
>  }
>
>  static Property applesmc_isa_properties[] = {
> --

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM
diff mbox series

Patch

diff --git a/hw/misc/applesmc.c b/hw/misc/applesmc.c
index 72300d0cbc..8e65816da6 100644
--- a/hw/misc/applesmc.c
+++ b/hw/misc/applesmc.c
@@ -342,7 +342,6 @@  static void applesmc_isa_realize(DeviceState *dev, Error **errp)
     }
 
     QLIST_INIT(&s->data_def);
-    qdev_applesmc_isa_reset(dev);
 }
 
 static Property applesmc_isa_properties[] = {