From patchwork Mon Jul 21 12:02:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 4594691 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D02A49F2B8 for ; Mon, 21 Jul 2014 12:03:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 080B820120 for ; Mon, 21 Jul 2014 12:03:05 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 48880200B4 for ; Mon, 21 Jul 2014 12:03:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4E3D16E180; Mon, 21 Jul 2014 05:03:03 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by gabe.freedesktop.org (Postfix) with ESMTP id BD6FE6E180 for ; Mon, 21 Jul 2014 05:03:01 -0700 (PDT) Received: by mail-wi0-f173.google.com with SMTP id f8so4006545wiw.6 for ; Mon, 21 Jul 2014 05:03:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=MyPkPZKjiz7mUddV+KnZlVMrAz2/Y+UeSi1QgCQyx/Q=; b=SYTqUWTQg8fZn1G+9GIVYF/qlvIHDMzec7nT0F3zTNYUX+Ty2I4JqqtsmKKHvelmxb D3RajYZvjD+sABdpGsRBYdA+aR8Z5zYT4+9poA9BSih5ZzRgCGzn1OaiieeoAdZu3t3D f8g4h0r+lf2Xdpsoht+yAzY+2Y4ld3HMG9UxTkl3epH0TXLp/oL9SGvBASp7OX8TJYBU UGwvYVA2fc6Zi/OaXt6M+a22OO/zGqYRIPlZOhGZOU+LH6zWPR6Mj/6GVH8aQjTKhTEu 5I4BftIVbYNbIe8DDjjnyxR6oPju0BLerU1FXTD3JzRyA/EB/CrIfFXD6yP3/Pc280zC fC/g== X-Received: by 10.194.222.5 with SMTP id qi5mr21913332wjc.62.1405944180467; Mon, 21 Jul 2014 05:03:00 -0700 (PDT) Received: from localhost (port-11394.pppoe.wtnet.de. [84.46.44.174]) by mx.google.com with ESMTPSA id wu6sm37126331wjb.46.2014.07.21.05.02.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Jul 2014 05:02:59 -0700 (PDT) From: Thierry Reding To: Ben Skeggs Subject: [PATCH] drm/nouveau/disp: Use NULL for pointers Date: Mon, 21 Jul 2014 14:02:58 +0200 Message-Id: <1405944178-3500-1-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 2.0.1 Cc: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 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.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 From: Thierry Reding The return type of exec_lookup() is struct nvkm_output *, so it should return NULL rather than 0. Signed-off-by: Thierry Reding Reviewed-by: Emil Velikov --- drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c b/drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c index fa30d8196f35..ebf64e1d0a70 100644 --- a/drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c +++ b/drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c @@ -939,7 +939,7 @@ exec_lookup(struct nv50_disp_priv *priv, int head, int or, u32 ctrl, case 0x00000900: type = DCB_OUTPUT_DP; mask = 2; break; default: nv_error(priv, "unknown SOR mc 0x%08x\n", ctrl); - return 0x0000; + return NULL; } }