diff mbox

Fwd: [PATCH v2 3/5] Change return type of functions that are named *_exit or *_exitfn in hw/core from int to void

Message ID CADyday1qsVHCYzZ3HRjd_ZsiUN3mc2sgzjrD5xBdjDYaboYGEg@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Nutan Shinde April 12, 2016, 6:22 p.m. UTC
This change is required because the return type of exit(error) function is
not used.
This patch only has changes for files in hw/core package.

Signed-off-by: Nutan Shinde <nutanshinde1992@gmail.com>
---
 hw/core/qdev.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)


--
1.9.1
diff mbox

Patch

diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index db41aa1..7495fcf 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -237,11 +237,7 @@  static void device_unrealize(DeviceState *dev, Error
**errp)
     DeviceClass *dc = DEVICE_GET_CLASS(dev);

     if (dc->exit) {
-        int rc = dc->exit(dev);
-        if (rc < 0) {
-            error_setg(errp, "Device exit failed.");
-            return;
-        }
+        dc->exit(dev);
     }
 }