Message ID | 85da7112bfad2994c36ea52bbe58babd8ddb0bc9.1552495696.git.jsarha@ti.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp14569487jad; Wed, 13 Mar 2019 10:25:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqysgs3kx2wABo4frcofXuOZI4U+DFn0c1/HsLKASD/WKtUfVpgHq8WfJM58smwaeg8Q7j2X X-Received: by 2002:a17:902:848c:: with SMTP id c12mr10061214plo.207.1552497938837; Wed, 13 Mar 2019 10:25:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552497938; cv=none; d=google.com; s=arc-20160816; b=CHH9xgYB7zZu8HNjitmEQltqWnbtO7ma6t+U7SsLO0g5GtbQVITu9Gph9QGcXz370o ghu9jBCCMfkJPU0exEYxDbfZXj7yzJkGUxHNV5NXAA64TzzMo5KuCYbDBFg1rUF3DEN0 fpvY/59Es7PQgJByDpiArxXun/NU0FQ4P0pMhwl+Zew1q2sDfyEpnGOo+YaKyyXkN6HD 99Kvib3jQkoGT8fRFyG5iHzpgvu+gWeVrEEWJUYrcjjN2pjWqUxCRiGz6CEihJWBOuur Hb5k8fvIf6xiJFkd0Zf9m97PsUayKndGfaZg65ZLKMtiuM532EyTT8iqnYuw96OTJ2z0 ywVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=G/2VsRdvK09t6eNo81n8PtpWjjfUwhpzl8bTCb+8qbI=; b=zdGfFD8sPVCKNAMR1omoPyV/HnZl7pZl7cofVaQX/T9BU5tgM59mQLBiOGmbf9dW3Y vK3LgIcq3BkYHmzWfdiz3bMNHmIjqP2MHAa+4Sb/rdRligvAikoD/LjaTwCoiJja39NR pBqy2JdenNgxGlHxqmu7c7KB0wACJuH61lht8qZS2TY3UlxsKK7G4QMHEYrRclst48N4 GDvggLC6dWQ8OmAChz7Sit6WZhv8jDM/phnfR7UfykvYqjX19BN+DsL9eOW0Xu8Mk16R FFR8SGrIydm28687JpO26NWqS+muS56+hMMncdzhYdShbmkQ0LOfRHfrxTYgsRc9MDsA ZLkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: <dri-devel-bounces@lists.freedesktop.org> Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id f127si4323857pgc.505.2019.03.13.10.25.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Mar 2019 10:25:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5BE9A8984C; Wed, 13 Mar 2019 17:25:37 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by gabe.freedesktop.org (Postfix) with ESMTPS id 75D858984C for <dri-devel@lists.freedesktop.org>; Wed, 13 Mar 2019 17:25:34 +0000 (UTC) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x2DHPVeZ106620; Wed, 13 Mar 2019 12:25:31 -0500 Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x2DHPVVg124686 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 13 Mar 2019 12:25:31 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Wed, 13 Mar 2019 12:25:28 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Wed, 13 Mar 2019 12:25:28 -0500 Received: from jadmar.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id x2DHPPW2005725; Wed, 13 Mar 2019 12:25:27 -0500 From: Jyri Sarha <jsarha@ti.com> To: <dri-devel@lists.freedesktop.org> Subject: [PATCH v2 1/2] drm/tilcdc: Check drm_fb_cma_get_gem_obj() return value Date: Wed, 13 Mar 2019 19:25:23 +0200 Message-ID: <85da7112bfad2994c36ea52bbe58babd8ddb0bc9.1552495696.git.jsarha@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <cover.1552495696.git.jsarha@ti.com> References: <cover.1552495696.git.jsarha@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1552497931; bh=9+3FOYwiw55/F588362N1T3DGqrc9ckeUa5A4Pzud5s=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=g2DM0vFQBtlaniVRuRoxW7PFkkLZEfXRLbShKxVkf95ms4+EBOA8yg2j2ZP2j39ji jiUW9U5Cs507q282vW2w5jWEhLkov7sGVHPAOG5TWwHyXhxBlAUBYNvtbeEh/pHIab VdKb0bK+bv7YirJyHx8m3BfAS9EhRpBeDqbtosd4= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Cc: peter.ujfalusi@ti.com, tomi.valkeinen@ti.com, laurent.pinchart@ideasonboard.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> |
Series |
drm/tilcdc: a cleanup and a fix
|
expand
|
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c index 1067e702c22c..bc9f859f45dc 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c @@ -75,6 +75,8 @@ static void set_scanout(struct drm_crtc *crtc, struct drm_framebuffer *fb) u64 dma_base_and_ceiling; gem = drm_fb_cma_get_gem_obj(fb, 0); + if (WARN_ON(!gem)) /* Make Clockwork quiet. Should never happen. */ + return; start = gem->paddr + fb->offsets[0] + crtc->y * fb->pitches[0] +
Clockwork, a static code analysis SW, complains about drm_fb_cma_get_gem_obj() possibly returning NULL. This should never happen with the frame-buffers used by tilcdc. However, returning null is still a part of the drm_fb_cma_get_gem_obj() API, so lets make Clockwork quiet by adding a simple check with WARN. Signed-off-by: Jyri Sarha <jsarha@ti.com> --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 ++ 1 file changed, 2 insertions(+)