From patchwork Fri Apr 26 04:44:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2490811 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 407453FC64 for ; Fri, 26 Apr 2013 04:57:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753937Ab3DZE44 (ORCPT ); Fri, 26 Apr 2013 00:56:56 -0400 Received: from mail-pb0-f52.google.com ([209.85.160.52]:63797 "EHLO mail-pb0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751530Ab3DZE4z (ORCPT ); Fri, 26 Apr 2013 00:56:55 -0400 Received: by mail-pb0-f52.google.com with SMTP id mc17so805693pbc.39 for ; Thu, 25 Apr 2013 21:56:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=dR7OWwy8wX2RKIkZfohflJga4d95MpsZcGru1cGkVOs=; b=QPgWs7IXoiRgsC6Ilnhf7E+Ssx8gXtCr8+XslaqdjYxhwAQGPhuikSPgIJERx/2yHZ dR8IqF45Z7z+iVAz4ZZVG8ZxYUVta4nfSkcxmD3NAy4UBD1cBcyGBliOiuPiSa3XCepU CucNWtVE2i/b9eWao9u81Y8Fe0QFanntsMe/A3VrMB45z+isE2wJAZNWlZD9pv41i29P Oa06wDlDYyACusiwLYio174AYU68Wr5Q551plVCD9mGKbmomEaP8iP3p4R6h3n6b8pKn 2v1acPxgcBrYSj94480Y8cKGCsrQMLrolQOCC3f4WfqYEcrvpFzaj00ymetrrpZ3gxGw yLjQ== X-Received: by 10.66.122.42 with SMTP id lp10mr45500307pab.116.1366952215125; Thu, 25 Apr 2013 21:56:55 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id bs3sm10037667pbb.36.2013.04.25.21.56.51 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 25 Apr 2013 21:56:54 -0700 (PDT) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: s.nawrocki@samsung.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 1/1] [media] exynos4-is: Fix potential null pointer dereference in mipi-csis.c Date: Fri, 26 Apr 2013 10:14:07 +0530 Message-Id: <1366951447-6202-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQmKUKNr0jgY2nuYcJX4lQ5tnwxGOTh3fIldhlAx2YtlnN6CLWpjBJr/NDzkYcYZDWQO1ana Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org When 'node' is NULL, the print statement tries to dereference it. Remove it from the error message. Signed-off-by: Sachin Kamat --- drivers/media/platform/exynos4-is/mipi-csis.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/platform/exynos4-is/mipi-csis.c b/drivers/media/platform/exynos4-is/mipi-csis.c index a2eda9d..6ddc69f 100644 --- a/drivers/media/platform/exynos4-is/mipi-csis.c +++ b/drivers/media/platform/exynos4-is/mipi-csis.c @@ -745,8 +745,7 @@ static int s5pcsis_parse_dt(struct platform_device *pdev, node = v4l2_of_get_next_endpoint(node, NULL); if (!node) { - dev_err(&pdev->dev, "No port node at %s\n", - node->full_name); + dev_err(&pdev->dev, "Port node not available\n"); return -EINVAL; } /* Get port node and validate MIPI-CSI channel id. */