Skip to content

Commit cf48a14

Browse files
hoshinolinamarcan
authored andcommitted
soc: apple: rtkit: Log failure to send messages
Signed-off-by: Asahi Lina <lina@asahilina.net>
1 parent 066f227 commit cf48a14

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

drivers/soc/apple/rtkit.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,11 +613,18 @@ int apple_rtkit_send_message(struct apple_rtkit *rtk, u8 ep, u64 message,
613613
int ret;
614614
gfp_t flags;
615615

616-
if (rtk->crashed)
616+
if (rtk->crashed) {
617+
dev_warn(rtk->dev,
618+
"RTKit: Device is crashed, cannot send message\n");
617619
return -EINVAL;
620+
}
621+
618622
if (ep >= APPLE_RTKIT_APP_ENDPOINT_START &&
619-
!apple_rtkit_is_running(rtk))
623+
!apple_rtkit_is_running(rtk)) {
624+
dev_warn(rtk->dev,
625+
"RTKit: Endpoint 0x%02x is not running, cannot send message\n", ep);
620626
return -EINVAL;
627+
}
621628

622629
if (atomic)
623630
flags = GFP_ATOMIC;

0 commit comments

Comments
 (0)