Fixed CID 1301: we should probably have the null check of defaultPipe before it
is first dereferenced... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27430 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -124,7 +124,6 @@ BusManager::AllocateDevice(Hub *parent, int8 hubAddress, uint8 hubPort,
|
||||
|
||||
TRACE(("USB BusManager: setting device address to %d\n", deviceAddress));
|
||||
ControlPipe *defaultPipe = _GetDefaultPipe(speed);
|
||||
defaultPipe->SetHubInfo(hubAddress, hubPort);
|
||||
|
||||
if (!defaultPipe) {
|
||||
TRACE_ERROR(("USB BusManager: error getting the default pipe for speed %d\n", (int)speed));
|
||||
@@ -132,6 +131,8 @@ BusManager::AllocateDevice(Hub *parent, int8 hubAddress, uint8 hubPort,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
defaultPipe->SetHubInfo(hubAddress, hubPort);
|
||||
|
||||
status_t result = B_ERROR;
|
||||
for (int32 i = 0; i < 3; i++) {
|
||||
// Set the address of the device USB 1.1 spec p202
|
||||
|
||||
Reference in New Issue
Block a user