From: Hoan Tran Date: Fri, 14 Oct 2016 23:20:21 +0000 (-0700) Subject: mailbox: PCC: Fix return value of pcc_mbox_request_channel() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d0679cfaf54c9e42e3ba4f8d5e67969932040d16;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mailbox: PCC: Fix return value of pcc_mbox_request_channel() When CONFIG_PCC is disabled, pcc_mbox_request_channel() needs to return ERR_PTR(-ENODEV), not a NULL pointer, as the callers of this function use IS_ERR() to check for error code. Signed-off-by: Duc Dang Signed-off-by: Hoan Tran Signed-off-by: Rafael J. Wysocki --- diff --git a/include/acpi/pcc.h b/include/acpi/pcc.h index 17a940a14477..8caa79c61703 100644 --- a/include/acpi/pcc.h +++ b/include/acpi/pcc.h @@ -21,7 +21,7 @@ extern void pcc_mbox_free_channel(struct mbox_chan *chan); static inline struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *cl, int subspace_id) { - return NULL; + return ERR_PTR(-ENODEV); } static inline void pcc_mbox_free_channel(struct mbox_chan *chan) { } #endif