OSDN Git Service

msm: early_domain: return directly if early domain disabled
authorAndy Sun <bins@codeaurora.org>
Thu, 27 Dec 2018 07:32:37 +0000 (15:32 +0800)
committerAndy Sun <bins@codeaurora.org>
Thu, 27 Dec 2018 07:32:41 +0000 (15:32 +0800)
If early_domain_enabled is false, ed_core_data won't be allocated memory,
accessing early_domain_request will cause kernel Oops.

Change-Id: I8a64c574141a7647e699710b566cc5997d372478
Signed-off-by: Andy Sun <bins@codeaurora.org>
drivers/soc/qcom/early_dom.c

index 6731284..fe54820 100644 (file)
@@ -66,6 +66,9 @@ void request_early_service_shutdown(enum service_id sid)
        struct early_domain_core *domain = ed_core_data;
        unsigned long *request;
 
+       if (!early_domain_enabled)
+               return;
+
        request = &domain->pdata->early_domain_request;
        set_bit(sid, request);
 }