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
This commit is contained in:
François Revol
2010-11-01 17:57:36 +00:00
parent 499f2a5c48
commit a55b596e1c
@@ -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;