Skip to content

Commit

Permalink
fix: Call IOService::stop when registerHandler fails
Browse files Browse the repository at this point in the history
  • Loading branch information
VisualEhrmanntraut committed Nov 4, 2024
1 parent 49dc305 commit ec8ef3c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions SMCRadeonSensors/SMCRadeonSensors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ bool PRODUCT_NAME::start(IOService *provider) {
this->vsmcNotifier = VirtualSMCAPI::registerHandler(vsmcNotificationHandler, this);
if (this->vsmcNotifier == nullptr) {
SYSLOG("init", "VirtualSMCAPI::registerHandler failed");
IOService::stop(provider);
return false;
}

Expand Down

0 comments on commit ec8ef3c

Please sign in to comment.