]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Drivers/PL390Gic/PL390GicDxe.c
Arm Packages: Fixed coding style/Line endings to follow EDK2 coding convention
[mirror_edk2.git] / ArmPkg / Drivers / PL390Gic / PL390GicDxe.c
index 8bf818768e1b8801c2dc1ba0d03f431605b3750d..02853a2f31878e093056879a7137202a93f8f75f 100644 (file)
@@ -80,7 +80,7 @@ RegisterInterruptSource (
   if (Source > PcdGet32(PcdGicNumInterrupts)) {
     ASSERT(FALSE);
     return EFI_UNSUPPORTED;
-  } 
+  }
   
   if ((Handler == NULL) && (gRegisteredInterruptHandlers[Source] == NULL)) {
     return EFI_INVALID_PARAMETER;
@@ -91,7 +91,13 @@ RegisterInterruptSource (
   }
 
   gRegisteredInterruptHandlers[Source] = Handler;
-  return This->EnableInterruptSource(This, Source);
+
+  // If the interrupt handler is unregistered then disable the interrupt
+  if (NULL == Handler){
+       return This->DisableInterruptSource (This, Source);
+  } else {
+       return This->EnableInterruptSource (This, Source);
+  }
 }
 
 /**