ACPI: Avoid discarding a potential error value.
This is part of a new diagnostic I've managed to wire up that finds all instances of "status_t" function return values being discarded using attribute trickery and some creative Clang pragmas. As you might guess, the resultant errors list is absolutely gigantic, and most of them are ones where the failure condition will never (that we care about) be hit. The ones in this commit likely are no-op changes, but they were low-hanging fruit spotted while reviewing the larger list. The next commit will bring more substantial changes.
This commit is contained in:
parent
2846db2e99
commit
a4a538db9f
@ -772,10 +772,9 @@ AcpiOsRemoveInterruptHandler(UINT32 interruptNumber,
|
||||
DEBUG_FUNCTION_F("vector: %lu; handler: %p", (uint32)interruptNumber,
|
||||
serviceRoutine);
|
||||
#ifdef _KERNEL_MODE
|
||||
remove_io_interrupt_handler(interruptNumber,
|
||||
(interrupt_handler) serviceRoutine,
|
||||
sInterruptHandlerData[interruptNumber]);
|
||||
return AE_OK;
|
||||
return remove_io_interrupt_handler(interruptNumber,
|
||||
(interrupt_handler)serviceRoutine,
|
||||
sInterruptHandlerData[interruptNumber]) == B_OK ? AE_OK : AE_ERROR;
|
||||
#else
|
||||
return AE_ERROR;
|
||||
#endif
|
||||
|
@ -188,15 +188,13 @@ static status_t
|
||||
EcLock(struct acpi_ec_cookie *sc)
|
||||
{
|
||||
/* If _GLK is non-zero, acquire the global lock. */
|
||||
status_t status = B_OK;
|
||||
if (sc->ec_glk) {
|
||||
status = sc->ec_acpi_module->acquire_global_lock(EC_LOCK_TIMEOUT,
|
||||
status_t status = sc->ec_acpi_module->acquire_global_lock(EC_LOCK_TIMEOUT,
|
||||
&sc->ec_glkhandle);
|
||||
if (status != B_OK)
|
||||
return status;
|
||||
}
|
||||
mutex_lock(&sc->ec_lock);
|
||||
return status;
|
||||
return mutex_lock(&sc->ec_lock);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user