Skip to content

Commit db16bfc

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

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
@@ -601,11 +601,18 @@ int apple_rtkit_send_message(struct apple_rtkit *rtk, u8 ep, u64 message,
601601
int ret;
602602
gfp_t flags;
603603

604-
if (rtk->crashed)
604+
if (rtk->crashed) {
605+
dev_warn(rtk->dev,
606+
"RTKit: Device is crashed, cannot send message\n");
605607
return -EINVAL;
608+
}
609+
606610
if (ep >= APPLE_RTKIT_APP_ENDPOINT_START &&
607-
!apple_rtkit_is_running(rtk))
611+
!apple_rtkit_is_running(rtk)) {
612+
dev_warn(rtk->dev,
613+
"RTKit: Endpoint 0x%02x is not running, cannot send message\n", ep);
608614
return -EINVAL;
615+
}
609616

610617
if (atomic)
611618
flags = GFP_ATOMIC;

0 commit comments

Comments
 (0)