--- zzzz-none-000/linux-5.4.213/drivers/soc/qcom/glink_ssr.c 2022-09-15 10:04:56.000000000 +0000 +++ alder-5690pro-762/linux-5.4.213/drivers/soc/qcom/glink_ssr.c 2024-08-14 09:02:08.000000000 +0000 @@ -9,6 +9,7 @@ #include #include #include +#include /** * struct do_cleanup_msg - The data structure for an SSR do_cleanup message @@ -87,7 +88,21 @@ struct glink_ssr *ssr = container_of(nb, struct glink_ssr, nb); struct do_cleanup_msg msg; char *ssr_name = data; - int ret; + int ret, num_subdev = 0, tmp; + char **ssr_subdev_name; + + ssr_subdev_name = qcom_get_ssr_subdev_name(ssr->dev->parent, + &num_subdev); + if (!ssr_subdev_name) + return NOTIFY_DONE; + + for (tmp = 0; tmp < num_subdev; tmp++) { + if (!strcmp(ssr_name, ssr_subdev_name[tmp])) + break; + } + kfree(ssr_subdev_name); + if (tmp == num_subdev) + return NOTIFY_DONE; ssr->seq_num++; reinit_completion(&ssr->completion);