[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 04/23] ide: Make it explicit that ide_create_drive()
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 04/23] ide: Make it explicit that ide_create_drive() can't fail |
Date: |
Fri, 2 Jul 2010 18:38:13 +0200 |
From: Markus Armbruster <address@hidden>
All callers of ide_create_drive() ignore its value. Currently
harmless, because it fails only when qdev_init() fails, which fails
only when ide_drive_initfn() fails, which never fails.
Brittle. Change it to die instead of silently ignoring failure.
Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
hw/ide/qdev.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
index 0f9f22e..127478b 100644
--- a/hw/ide/qdev.c
+++ b/hw/ide/qdev.c
@@ -84,8 +84,7 @@ IDEDevice *ide_create_drive(IDEBus *bus, int unit, DriveInfo
*drive)
dev = qdev_create(&bus->qbus, "ide-drive");
qdev_prop_set_uint32(dev, "unit", unit);
qdev_prop_set_drive(dev, "drive", drive);
- if (qdev_init(dev) < 0)
- return NULL;
+ qdev_init_nofail(dev);
return DO_UPCAST(IDEDevice, qdev, dev);
}
--
1.6.6.1
- [Qemu-devel] [PATCH 22/23] block: Fix early failure in multiwrite, (continued)
- [Qemu-devel] [PATCH 22/23] block: Fix early failure in multiwrite, Kevin Wolf, 2010/07/02
- [Qemu-devel] [PATCH 23/23] block: Handle multiwrite errors only when all requests have completed, Kevin Wolf, 2010/07/02
- [Qemu-devel] [PATCH 21/23] qemu-img: avoid calling exit(1) to release resources properly, Kevin Wolf, 2010/07/02
- [Qemu-devel] [PATCH 15/23] blkdebug: Initialize state as 1, Kevin Wolf, 2010/07/02
- [Qemu-devel] [PATCH 09/23] qdev: Decouple qdev_prop_drive from DriveInfo, Kevin Wolf, 2010/07/02
- [Qemu-devel] [PATCH 07/23] blockdev: New drive_get_by_blockdev(), Kevin Wolf, 2010/07/02
- [Qemu-devel] [PATCH 08/23] blockdev: Clean up automatic drive deletion, Kevin Wolf, 2010/07/02
- [Qemu-devel] [PATCH 17/23] block: Clean up bdrv_snapshots(), Kevin Wolf, 2010/07/02
- [Qemu-devel] [PATCH 18/23] block: Fix virtual media change for if=none, Kevin Wolf, 2010/07/02
- [Qemu-devel] [PATCH 16/23] savevm: Survive hot-unplug of snapshot device, Kevin Wolf, 2010/07/02
- [Qemu-devel] [PATCH 04/23] ide: Make it explicit that ide_create_drive() can't fail,
Kevin Wolf <=
- [Qemu-devel] [PATCH 12/23] qemu-option: New qemu_opts_reset(), Kevin Wolf, 2010/07/02
- [Qemu-devel] [PATCH 14/23] blkdebug: Free QemuOpts after having read the config, Kevin Wolf, 2010/07/02
- [Qemu-devel] [PATCH 05/23] blockdev: Remove drive_get_serial(), Kevin Wolf, 2010/07/02
- [Qemu-devel] [PATCH 13/23] blkdebug: Fix set_state_opts definition, Kevin Wolf, 2010/07/02