From patchwork Fri Oct 14 23:20:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: hotran X-Patchwork-Id: 9377631 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3A417607FD for ; Fri, 14 Oct 2016 23:21:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D0DF2A16E for ; Fri, 14 Oct 2016 23:21:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2167D2A21B; Fri, 14 Oct 2016 23:21:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A16C52A16E for ; Fri, 14 Oct 2016 23:21:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753124AbcJNXVG (ORCPT ); Fri, 14 Oct 2016 19:21:06 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:33734 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752147AbcJNXVF (ORCPT ); Fri, 14 Oct 2016 19:21:05 -0400 Received: by mail-pa0-f43.google.com with SMTP id vu5so50234898pab.0 for ; Fri, 14 Oct 2016 16:21:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apm.com; s=apm; h=from:to:cc:subject:date:message-id; bh=uTq0F0cyyTmEgHWEYmryVzaN9wpYa399lL43WAtkprw=; b=ZIYP1GlvPhZ97kY8ylZURQW0/zcMY4r+eaExSf3/tt1zaYilkOuJ12xGToBgPpWhPz qYpccl1MhXCEn8N39ENBpwfHrFGQ/7UwDo0XoBqXtqiHBRwi18q7FqfAx6fvBJCOLRoN EAu7Csnjcb//QtlDDVepvwESvxkDvsr1/iNrI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=uTq0F0cyyTmEgHWEYmryVzaN9wpYa399lL43WAtkprw=; b=iyEotYCX6EF5BoFWtONSLhQ+LygikJRHZFZnIjHiEHhTdcKiZ2TBKZskvGre508oaU 4B3y1rvRM/8RuZxIKjfLGZp12nfpRwzkbqZbEpGC4XtHo0NR+66mlwYoexZYUXVSLDQg VMZQgWZ0J5PbXRaOS7tqcvhkMl1g/Fns5hPh9PpunYQnIu8kjVBcF8GsU45DffJLcIN4 cM3SrdHFLsbeGWEJ/2rIZgMzzxiynraRqs0soTLBjCV37vFeFosCXxg1yzMhfJcGUAsx F1aU1S+FzqUagEduhWQzddlcrhdw/gMlKOy+xBq29uW8rgdpgBgri1r5dM7rPVsl+3TR uC9Q== X-Gm-Message-State: AA6/9RkkeIF9EqsbzW2zgaxstmAl5OuLQMGlfkWns3t2iz8sxrcLO6UaWstoCFiQwOOdh2z5 X-Received: by 10.66.221.97 with SMTP id qd1mr18072016pac.120.1476487264645; Fri, 14 Oct 2016 16:21:04 -0700 (PDT) Received: from hotran_localhost.amcc.com ([206.80.4.98]) by smtp.gmail.com with ESMTPSA id x1sm521526pax.7.2016.10.14.16.21.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Oct 2016 16:21:04 -0700 (PDT) From: Hoan Tran To: "Rafael J. Wysocki" , Len Brown , Robert Moore , Prakash Prashanth Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, lho@apm.com, Duc Dang , devel@acpica.org, Hoan Tran Subject: [PATCH] mailbox: PCC: Fix return value of pcc_mbox_request_channel() Date: Fri, 14 Oct 2016 16:20:21 -0700 Message-Id: <1476487221-20337-1-git-send-email-hotran@apm.com> X-Mailer: git-send-email 1.9.1 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- include/acpi/pcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/acpi/pcc.h b/include/acpi/pcc.h index 17a940a..8caa79c 100644 --- a/include/acpi/pcc.h +++ b/include/acpi/pcc.h @@ -21,7 +21,7 @@ extern struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *cl, 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