Skip to content

Commit

Permalink
mailbox: PCC: Fix return value of pcc_mbox_request_channel()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Hoan Tran <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
hotran authored and rafaeljw committed Oct 17, 2016
1 parent b59c4b3 commit d0679cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/acpi/pcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d0679cf

Please sign in to comment.