From patchwork Wed Aug 14 11:08:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2844927 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 33A92BF546 for ; Thu, 15 Aug 2013 00:16:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6DF5A20625 for ; Thu, 15 Aug 2013 00:16:48 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 9B4BC20622 for ; Thu, 15 Aug 2013 00:16:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 72653E5DE5 for ; Wed, 14 Aug 2013 17:16:47 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pd0-f176.google.com (mail-pd0-f176.google.com [209.85.192.176]) by gabe.freedesktop.org (Postfix) with ESMTP id E520B43A34 for ; Wed, 14 Aug 2013 04:25:10 -0700 (PDT) Received: by mail-pd0-f176.google.com with SMTP id q10so6164496pdj.21 for ; Wed, 14 Aug 2013 04:25:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=O0hNqv3vantKTuoC7Mw28DP6RoJZ19j7u9bNvv7A9gM=; b=PxJ1bRca+0fX6XHCGrP5eHpKbzcfIf1aWcy12gEO/K/hsFxIvCppJ/h659eIOxwZNq xHX5fQyG48DxS81MpYRCWN2aXjdSV7/TDqYmBLYTVscy02lO0LaDjXQpE11n4yIc5RDk mBOGA5BTMUMwqqjXMDpUBSqRsmQfajtcmGHtpUfo7mHHzjBvdhZy4AOP2eYlu3ebY/Rg gEcXec0dAqIQiUNWJHuRzZjlL0Gb4sQXx10s/pUHiYCiNIbnBz9KTFiNio2h95f3KwdM lZVLhI1fhvuL3q5mGq+psdlQPZ6cP9PT5JRFV6ORfhoYveaxaZ9ExYWAkqOOQ5oiKAhy 76Cg== X-Gm-Message-State: ALoCoQlkjbTkbe8SW8EONwSW9ExT+Ig2e29xBnLASyBUoc8Ncjc+IV281A80Sb7vM9m8JH+yWnF8 X-Received: by 10.67.2.74 with SMTP id bm10mr9303481pad.109.1376479510597; Wed, 14 Aug 2013 04:25:10 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id xs1sm4552370pac.7.2013.08.14.04.25.06 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Aug 2013 04:25:09 -0700 (PDT) From: Sachin Kamat To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/4] drm/exynos: Remove redundant NULL check in exynos_drm_buf Date: Wed, 14 Aug 2013 16:38:00 +0530 Message-Id: <1376478483-13512-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Mailman-Approved-At: Wed, 14 Aug 2013 17:11:05 -0700 Cc: sachin.kamat@linaro.org, sw0312.kim@samsung.com, patches@linaro.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 kfree handles null pointers. Hence this check is not necessary. Signed-off-by: Sachin Kamat --- drivers/gpu/drm/exynos/exynos_drm_buf.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_buf.c b/drivers/gpu/drm/exynos/exynos_drm_buf.c index b8ac06d..7f489e7 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_buf.c +++ b/drivers/gpu/drm/exynos/exynos_drm_buf.c @@ -161,11 +161,6 @@ struct exynos_drm_gem_buf *exynos_drm_init_buf(struct drm_device *dev, void exynos_drm_fini_buf(struct drm_device *dev, struct exynos_drm_gem_buf *buffer) { - if (!buffer) { - DRM_DEBUG_KMS("buffer is null.\n"); - return; - } - kfree(buffer); buffer = NULL; }