From a55b596e1c56ad6fd5160127864add184b8dd854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Mon, 1 Nov 2010 17:57:36 +0000 Subject: [PATCH] Allocate the IOReq if not done yet at Open() time. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39256 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/boot/platform/amiga_m68k/devices.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/system/boot/platform/amiga_m68k/devices.cpp b/src/system/boot/platform/amiga_m68k/devices.cpp index 05eede0752..a1d9fe9d93 100644 --- a/src/system/boot/platform/amiga_m68k/devices.cpp +++ b/src/system/boot/platform/amiga_m68k/devices.cpp @@ -79,7 +79,12 @@ ExecDevice::AllocRequest(size_t requestSize) status_t ExecDevice::Open(const char *name, unsigned long unit, unsigned long flags) { - status_t err; + status_t err = B_OK; + + if (fIORequest == NULL) + err = AllocRequest(sizeof(struct IOStdReq)); + if (err < B_OK) + return err; err = exec_error(OpenDevice((uint8 *)name, unit, fIORequest, flags)); if (err < B_OK) return err;