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: 11619 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 36DD624110 for ; Fri, 21 Sep 2012 05:10:22 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id D467DA188E5 for ; Fri, 21 Sep 2012 05:10:21 +0000 (UTC) Received: by iafj25 with SMTP id j25so2198036iaf.11 for ; Thu, 20 Sep 2012 22:10:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=euyBlOlzNQ9yVFqVJ3SX4TSzm62vThy4GpGhXKC8Z6Q=; b=hHhk4HROR6mn0qKHTqqckUft6HEOKYh2ofUqRDoKmIFskdQ8ktYO+MNKTYltxBJTU8 1GcHtVsIpi1RH4QcpxCjo9AiUlivHv4GHN6TNRk5ehID6LGqeNW8Q0piK+Uy9Ag/kt1r G7MHNFIyjcfbepcnaL74J/fj8foQj8qMnZYn5w0u83F/v5FYcRUTB0bqK0MYqKbcDwDD aXcounbv/oCFVEF9bQNPNQWV0YzK0O6phGikehxM3fdBAoXiVo5VapZnuiO899XraSRI cfJdNLVGQHtB9E8w4+oLfEUwQx+iQB8XAmR8Z4pIT1QdyfSuDX+7vZi9wYGWRAEnzHMt hmyA== Received: by 10.50.217.227 with SMTP id pb3mr661753igc.28.1348204221038; Thu, 20 Sep 2012 22:10:21 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp112434igc; Thu, 20 Sep 2012 22:10:20 -0700 (PDT) Received: by 10.68.130.10 with SMTP id oa10mr12442664pbb.109.1348204220389; Thu, 20 Sep 2012 22:10:20 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id iv6si10373471pbc.118.2012.09.20.22.10.20 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 20 Sep 2012 22:10:20 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pb0-f50.google.com with SMTP id md12so7185034pbc.37 for ; Thu, 20 Sep 2012 22:10:20 -0700 (PDT) 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: ALoCoQnQQamkfMntgQLR/H4okAenXfdYXU5Hrz2JoKIyFz4KR21RGTrQ/geLTwJXarrrnFQzNYIw '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;