intel_extreme: only access ports pipe if it has one assigned.

This commit is contained in:
Rudolf Cornelissen 2021-06-19 13:52:40 +00:00
parent 1aca853fc9
commit 0af04dccaa
2 changed files with 7 additions and 0 deletions

View File

@ -163,6 +163,11 @@ Port::SetPipe(Pipe* pipe)
status_t
Port::Power(bool enabled)
{
if (fPipe == NULL) {
ERROR("%s: Setting power mode without assigned pipe!\n", __func__);
return B_ERROR;
}
fPipe->Enable(enabled);
return B_OK;

View File

@ -32,6 +32,8 @@ enable_all_pipes(bool enable)
continue;
if (!gInfo->ports[i]->IsConnected())
continue;
if (gInfo->ports[i]->GetPipe() == NULL)
continue;
gInfo->ports[i]->Power(enable);
}