From patchwork Sat Apr 25 09:34:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 6274711 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 63F48BF4A6 for ; Sat, 25 Apr 2015 14:42:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A591520221 for ; Sat, 25 Apr 2015 14:42:36 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 69DA22022A for ; Sat, 25 Apr 2015 14:42:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 200096E2D1; Sat, 25 Apr 2015 07:42:28 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailrelay119.isp.belgacom.be (mailrelay119.isp.belgacom.be [195.238.20.146]) by gabe.freedesktop.org (Postfix) with ESMTP id 8A1E06E010; Sat, 25 Apr 2015 02:34:52 -0700 (PDT) X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=wisUSL2q+2X910teRg2xg/30tBFW7lBMAi45pEFXNHU= c=1 sm=2 a=hBr7ZFA23_BhNdjecrsA:9 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2CrDgA3XztV/4hpsltcgwyBLrRsBQGBApg3BAKBOT0QAQEBAQEBAYEKQQWECC8jgRo3iC8BxyUshhaJQGUdhBcFnAuMG4k6I2BmgjA8MYECgUIBAQE Received: from 136.105-178-91.adsl-dyn.isp.belgacom.be (HELO localhost.home.) ([91.178.105.136]) by relay.skynet.be with ESMTP; 25 Apr 2015 11:34:50 +0200 From: Fabian Frederick To: linux-kernel@vger.kernel.org Subject: [PATCH 1/1 linux-next] drm/i915: use ERR_CAST instead of ERR_PTR/PTR_ERR Date: Sat, 25 Apr 2015 11:34:29 +0200 Message-Id: <1429954470-28430-1-git-send-email-fabf@skynet.be> X-Mailer: git-send-email 1.9.1 X-Mailman-Approved-At: Sat, 25 Apr 2015 07:42:24 -0700 Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Fabian Frederick , Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Inspired by scripts/coccinelle/api/err_cast.cocci Signed-off-by: Fabian Frederick Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/intel_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 897f17d..d52f267 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -1310,7 +1310,7 @@ intel_atomic_get_crtc_state(struct drm_atomic_state *state, struct drm_crtc_state *crtc_state; crtc_state = drm_atomic_get_crtc_state(state, &crtc->base); if (IS_ERR(crtc_state)) - return ERR_PTR(PTR_ERR(crtc_state)); + return ERR_CAST(crtc_state); return to_intel_crtc_state(crtc_state); }