From patchwork Tue Apr 16 06:02:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 16144 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-bk0-f69.google.com (mail-bk0-f69.google.com [209.85.214.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 795572395D for ; Tue, 16 Apr 2013 06:15:14 +0000 (UTC) Received: by mail-bk0-f69.google.com with SMTP id i18sf185189bkv.0 for ; Mon, 15 Apr 2013 23:14:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=L6cCRZRWw1CyVg8hIRNJra4r7ovcq99tHgXqP7em4Yw=; b=LXyhHnshz7Yb9IjBh1xJcwG4GazNLA6PllGs3+7rVrmexgVHzBYqBqh3jgsyDa8ia1 ADGV6UVaSPUSsQd1tRTijFjSHqzchk0+9EuCDm/SXhXGv4gwzRbcYTMf6oqTl8mxKjLm pQlwBq2/Uo777F3SHrSRJchgD/orORpSQz/WpnShDhplAo7KyXQZ60HjLv2JVYSvLdKy Ec87vehb8wJwwSXJ5q7ereIUubqVDQvbZBVunf37ruxR0n9zBH5wgY2fCusKHMon37Bb iT0R9EdnNg/9dME8nKbcxIWMsxUg6u3rTRTKjo7xpFhuEyO6Xg8KgwG5IeHB1CPFxdVS +AoQ== X-Received: by 10.180.198.210 with SMTP id je18mr222684wic.1.1366092881528; Mon, 15 Apr 2013 23:14:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.180.24.37 with SMTP id r5ls82989wif.3.gmail; Mon, 15 Apr 2013 23:14:41 -0700 (PDT) X-Received: by 10.194.176.195 with SMTP id ck3mr1197245wjc.5.1366092881460; Mon, 15 Apr 2013 23:14:41 -0700 (PDT) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id l5si146647wjz.160.2013.04.15.23.14.41 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Apr 2013 23:14:41 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.171; Received: by mail-ve0-f171.google.com with SMTP id b10so111394vea.2 for ; Mon, 15 Apr 2013 23:14:40 -0700 (PDT) X-Received: by 10.52.228.71 with SMTP id sg7mr468472vdc.51.1366092880346; Mon, 15 Apr 2013 23:14:40 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp8849veb; Mon, 15 Apr 2013 23:14:39 -0700 (PDT) X-Received: by 10.66.100.231 with SMTP id fb7mr1655854pab.162.1366092879304; Mon, 15 Apr 2013 23:14:39 -0700 (PDT) Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by mx.google.com with ESMTPS id s8si1407387pac.87.2013.04.15.23.14.38 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Apr 2013 23:14:39 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.50; Received: by mail-pa0-f50.google.com with SMTP id bg2so160382pad.23 for ; Mon, 15 Apr 2013 23:14:38 -0700 (PDT) X-Received: by 10.66.222.228 with SMTP id qp4mr1716727pac.113.1366092878806; Mon, 15 Apr 2013 23:14:38 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPS id li15sm1333239pab.2.2013.04.15.23.14.35 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Apr 2013 23:14:37 -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/5] [media] exynos4-is: Fix potential null pointer dereferencing Date: Tue, 16 Apr 2013 11:32:19 +0530 Message-Id: <1366092143-5482-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQm33OaxqcDsUniiS6qAs2f8zSEv79FTG+LkPHYgtCl16ZO256cJ3d6ctsCmemQruJZ991ZP X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , If fimc->drv_data is NULL, then fimc->drv_data->num_entities would cause NULL pointer dereferencing. Hence remove it from print statement. Signed-off-by: Sachin Kamat --- drivers/media/platform/exynos4-is/fimc-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/exynos4-is/fimc-core.c b/drivers/media/platform/exynos4-is/fimc-core.c index f25807d..a8eaad0 100644 --- a/drivers/media/platform/exynos4-is/fimc-core.c +++ b/drivers/media/platform/exynos4-is/fimc-core.c @@ -955,8 +955,8 @@ static int fimc_probe(struct platform_device *pdev) } if (!fimc->drv_data || fimc->id >= fimc->drv_data->num_entities || fimc->id < 0) { - dev_err(dev, "Invalid driver data or device id (%d/%d)\n", - fimc->id, fimc->drv_data->num_entities); + dev_err(dev, "Invalid driver data or device id (%d)\n", + fimc->id); return -EINVAL; } if (!dev->of_node)