From patchwork Fri Jun 3 17:22:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Bartke X-Patchwork-Id: 847922 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 p53HNl9O017895 for ; Fri, 3 Jun 2011 17:23:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752993Ab1FCRXb (ORCPT ); Fri, 3 Jun 2011 13:23:31 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:37980 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751636Ab1FCRXa (ORCPT ); Fri, 3 Jun 2011 13:23:30 -0400 Received: by bwz15 with SMTP id 15so1924634bwz.19 for ; Fri, 03 Jun 2011 10:23:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=TbEKmDKNxUWK80JiqGNlPPbLfU5eERtt0/WbNjgHLF0=; b=La3YHhB1nWo8ZC8V19rCxFrnCsTNMt/sU7eSiKQp7vIIKBilPHQ7uit5vcCb135ErW Rbvz+L1woKTquPH+tJd6LSN4Ud3qzSIdTKN7Sic3hwFDfwSoVq2Z0YiyUPcyMl80N2Di ElhOfNhrVrQLbBIb55cRxC+t/z/bvn7Mcub+s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=UGtslUiAzaMpzi0oC+ERMpiFDiOZaGOF3ohHIuavi+QLo5U3RlA2IrxXMg22cZ6h4j lIXcAKMHLE7WJUAYMdwTW40vs+oYpYUeWTB0l1m0GRidSvrc1nmYgwJRmvBM95Rq1IR4 MesHGmwA9yxACIGROTtvGmt+1dsYPLZ9/I/do= Received: by 10.204.42.69 with SMTP id r5mr2077032bke.52.1307121809070; Fri, 03 Jun 2011 10:23:29 -0700 (PDT) Received: from localhost.localdomain (dslb-188-098-000-112.pools.arcor-ip.net [188.98.0.112]) by mx.google.com with ESMTPS id k10sm1403017bkq.22.2011.06.03.10.23.27 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 03 Jun 2011 10:23:28 -0700 (PDT) From: Andre Bartke To: mchehab@infradead.org Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Andre Bartke Subject: [PATCH] drivers/media: fix uninitialized variable Date: Fri, 3 Jun 2011 19:22:01 +0200 Message-Id: <1307121721-6658-1-git-send-email-andre.bartke@gmail.com> X-Mailer: git-send-email 1.7.5.2 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.6 (demeter1.kernel.org [140.211.167.41]); Fri, 03 Jun 2011 17:23:48 +0000 (UTC) mx1_camera_add_device() can return an uninitialized value of ret. Signed-off-by: Andre Bartke --- drivers/media/video/mx1_camera.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/media/video/mx1_camera.c b/drivers/media/video/mx1_camera.c index bc0c23a..d9fc4b2 100644 --- a/drivers/media/video/mx1_camera.c +++ b/drivers/media/video/mx1_camera.c @@ -444,7 +444,7 @@ static int mx1_camera_add_device(struct soc_camera_device *icd) { struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); struct mx1_camera_dev *pcdev = ici->priv; - int ret; + int ret = 0; if (pcdev->icd) { ret = -EBUSY;