From patchwork Fri Sep 21 05:06:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 1489301 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id B2CFBDF28C for ; Fri, 21 Sep 2012 05:10:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752357Ab2IUFKV (ORCPT ); Fri, 21 Sep 2012 01:10:21 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:44185 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751595Ab2IUFKU (ORCPT ); Fri, 21 Sep 2012 01:10:20 -0400 Received: by mail-pb0-f46.google.com with SMTP id rr4so1789919pbb.19 for ; Thu, 20 Sep 2012 22:10:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=euyBlOlzNQ9yVFqVJ3SX4TSzm62vThy4GpGhXKC8Z6Q=; b=ns0EeN7NqUhhVH81CaW4c/6cpVpqFEC/MMbhucfiYPo9wlH0KcUwIC78jV2ZPtoDwD wn4e48D9Noo8FAaXqo5362iUDH3o2ycvBG4bvcQwqaK93yGqUSnYfAkmuMnSnvANkZJM mKjJKuTXHbMFei2WvXGYznEZlDou+NOECjrXxLr4IBvfDbtmSSIi8MadCuTaJINRKsA8 Jgw4bPyn/k5QHMX15U2C0OujjZtXp3mJ8BCif1xwoBMi+vaicCWfKRG0dsXeYy51qdQV qV+nLV2UE0QranW7rxrQx+ZaSAhb4rdnM4mRrsdxcJorv1hmYORIk33odwtgG83kI/gu MUzA== Received: by 10.66.78.97 with SMTP id a1mr10468243pax.34.1348204220155; Thu, 20 Sep 2012 22:10:20 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id wn4sm4563104pbc.55.2012.09.20.22.10.16 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 20 Sep 2012 22:10:19 -0700 (PDT) From: Sachin Kamat To: linux-fbdev@vger.kernel.org Cc: inki.dae@samsung.com, FlorianSchandinat@gmx.de, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH v2 2/2] video: exynos_mipi_dsi: Remove unnecessary NULL check Date: Fri, 21 Sep 2012 10:36:47 +0530 Message-Id: <1348204007-1347-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1348204007-1347-1-git-send-email-sachin.kamat@linaro.org> References: <1348204007-1347-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQkmPjzHgFHWWSCCqmLDs2fzm66x6YiKyDYq5OKd1OYq9tBoOlypw9Q83sA7uL1G0q5MvFUp Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org 'dsim' is allocated and checked for NULL in the probe function. Hence this check is redundant. This cleanup also fixes a potential NULL pointer dereference error when dsim which is NULL references its member in the error print message. Signed-off-by: Sachin Kamat Acked-by: Inki Dae --- drivers/video/exynos/exynos_mipi_dsi_common.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/drivers/video/exynos/exynos_mipi_dsi_common.c b/drivers/video/exynos/exynos_mipi_dsi_common.c index 7cc4113..3cd29a4 100644 --- a/drivers/video/exynos/exynos_mipi_dsi_common.c +++ b/drivers/video/exynos/exynos_mipi_dsi_common.c @@ -79,11 +79,6 @@ irqreturn_t exynos_mipi_dsi_interrupt_handler(int irq, void *dev_id) struct mipi_dsim_device *dsim = dev_id; unsigned int intsrc, intmsk; - if (dsim == NULL) { - dev_err(dsim->dev, "%s: wrong parameter\n", __func__); - return IRQ_NONE; - } - intsrc = exynos_mipi_dsi_read_interrupt(dsim); intmsk = exynos_mipi_dsi_read_interrupt_mask(dsim); intmsk = ~intmsk & intsrc;