aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/acpi/pcc.h
diff options
context:
space:
mode:
authorHoan Tran <hotran@apm.com>2016-10-14 16:20:21 -0700
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-10-17 14:26:49 +0200
commitd0679cfaf54c9e42e3ba4f8d5e67969932040d16 (patch)
treec8d54a14533d9542874726d2716a359cbfd2ee96 /include/acpi/pcc.h
parentACPI / CPPC: Support PCC with interrupt flag (diff)
downloadwireguard-linux-d0679cfaf54c9e42e3ba4f8d5e67969932040d16.tar.xz
wireguard-linux-d0679cfaf54c9e42e3ba4f8d5e67969932040d16.zip
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 <dhdang@apm.com> Signed-off-by: Hoan Tran <hotran@apm.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/acpi/pcc.h')
-rw-r--r--include/acpi/pcc.h2
1 files changed, 1 insertions, 1 deletions
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