From patchwork Mon Oct 18 09:51:35 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 261451 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9I9pg5c032111 for ; Mon, 18 Oct 2010 09:51:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754156Ab0JRJvl (ORCPT ); Mon, 18 Oct 2010 05:51:41 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:10500 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753952Ab0JRJvk (ORCPT ); Mon, 18 Oct 2010 05:51:40 -0400 Received: from eu_spt1 (mailout2.w1.samsung.com [210.118.77.12]) by mailout2.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0LAH008LOCQ2RE@mailout2.w1.samsung.com> for linux-media@vger.kernel.org; Mon, 18 Oct 2010 10:51:38 +0100 (BST) Received: from linux.samsung.com ([106.116.38.10]) by spt1.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LAH0078ACQ26X@spt1.w1.samsung.com> for linux-media@vger.kernel.org; Mon, 18 Oct 2010 10:51:38 +0100 (BST) Received: from mcdsrvbld02.digital.local (unknown [106.116.37.23]) by linux.samsung.com (Postfix) with ESMTP id 1462F27004F; Mon, 18 Oct 2010 11:51:25 +0200 (CEST) Date: Mon, 18 Oct 2010 11:51:35 +0200 From: Sylwester Nawrocki Subject: [PATCH] SR030PC30: Avoid use of uninitialized variables To: linux-media@vger.kernel.org Cc: kyungmin.park@samsung.com, m.szyprowski@samsung.com, Sylwester Nawrocki Message-id: <1287395495-1337-1-git-send-email-s.nawrocki@samsung.com> MIME-version: 1.0 X-Mailer: git-send-email 1.7.1 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 8BIT Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 18 Oct 2010 09:51:43 +0000 (UTC) diff --git a/drivers/media/video/sr030pc30.c b/drivers/media/video/sr030pc30.c index ec8d875..c9dc67a 100644 --- a/drivers/media/video/sr030pc30.c +++ b/drivers/media/video/sr030pc30.c @@ -326,7 +326,7 @@ static inline struct sr030pc30_info *to_sr030pc30(struct v4l2_subdev *sd) static inline int set_i2c_page(struct sr030pc30_info *info, struct i2c_client *client, unsigned int reg) { - int ret; + int ret = 0; u32 page = reg >> 8 & 0xFF; if (info->i2c_reg_page != page && (reg & 0xFF) != 0x03) {