From patchwork Tue Apr 16 06:02:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2447641 Return-Path: X-Original-To: patchwork-linux-media@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 8A680DF230 for ; Tue, 16 Apr 2013 06:14:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754065Ab3DPGOt (ORCPT ); Tue, 16 Apr 2013 02:14:49 -0400 Received: from mail-da0-f42.google.com ([209.85.210.42]:55392 "EHLO mail-da0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753725Ab3DPGOs (ORCPT ); Tue, 16 Apr 2013 02:14:48 -0400 Received: by mail-da0-f42.google.com with SMTP id n15so94399dad.1 for ; Mon, 15 Apr 2013 23:14:48 -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:in-reply-to :references:x-gm-message-state; bh=Zj5k1p71wj54eGblEkQxf3bh9yozr5Kw823LS/0W8Gs=; b=mmyw1wPf4TY8DUHYmdJpZwQnScKEVA+tcdpnXvzlYS0JhXa77DzhVaYrZfvfF7c+mb fy+mArfwjq/fXv6c+WTqMEhiPBKMPYxnfBWte/RTRCXd+7Tt18qPQdYKTxEMCfw3ZxoL /z5s4qHAduhC6eL8vOmZpVxXARdYkNSSj3PrHb1PDwvNrMlL9m9OAcKG3/veNzyptv54 JE5YK9+aI2n6XlGO/38G0rhu1QLRhkztLOPDAFWeMfAqkCt3WF/Pb3m1t9k7vgk+Ie52 uX6ZBfWaSrfeIw+dzi7Zi2RpzHW2nPxebpjShl2XGzNEio71QcYg4BdjGDHxjQO/BS/8 J7ug== X-Received: by 10.68.194.195 with SMTP id hy3mr1118436pbc.179.1366092888342; Mon, 15 Apr 2013 23:14:48 -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.45 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Apr 2013 23:14:47 -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 4/5] [media] exynos4-is: Initialize 'sensor' before using Date: Tue, 16 Apr 2013 11:32:22 +0530 Message-Id: <1366092143-5482-4-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1366092143-5482-1-git-send-email-sachin.kamat@linaro.org> References: <1366092143-5482-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQm9V3rfciLWDsAQm+86/aZm1YebMyYs2o+7czf8+0/W1mZI/Yj4PXJMBgLupTv7V8hW0JjU Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add missing initialization code to the 'sensor' data structure variable before using it. Signed-off-by: Sachin Kamat --- Only compile tested. --- drivers/media/platform/exynos4-is/fimc-is-sensor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/exynos4-is/fimc-is-sensor.c b/drivers/media/platform/exynos4-is/fimc-is-sensor.c index 02b2719..bda9093 100644 --- a/drivers/media/platform/exynos4-is/fimc-is-sensor.c +++ b/drivers/media/platform/exynos4-is/fimc-is-sensor.c @@ -268,7 +268,8 @@ err_gpio: static int fimc_is_sensor_remove(struct i2c_client *client) { - struct fimc_is_sensor *sensor; + struct v4l2_subdev *sd = i2c_get_clientdata(client); + struct fimc_is_sensor *sensor = sd_to_fimc_is_sensor(sd); regulator_bulk_free(SENSOR_NUM_SUPPLIES, sensor->supplies); media_entity_cleanup(&sensor->subdev.entity);