From patchwork Thu Oct 21 19:21:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 4686 Return-path: Envelope-to: mchehab@pedra Delivery-date: Thu, 21 Oct 2010 18:56:24 -0200 Received: from mchehab by pedra with local (Exim 4.72) (envelope-from ) id 1P92BU-00051h-45 for mchehab@pedra; Thu, 21 Oct 2010 18:56:24 -0200 Received: from casper.infradead.org [85.118.1.10] by pedra with IMAP (fetchmail-6.3.17) for (single-drop); Thu, 21 Oct 2010 18:56:24 -0200 (BRST) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1P90iK-0007QP-9x; Thu, 21 Oct 2010 19:22:12 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757876Ab0JUTWB (ORCPT + 1 other); Thu, 21 Oct 2010 15:22:01 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:39136 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752199Ab0JUTV7 (ORCPT ); Thu, 21 Oct 2010 15:21:59 -0400 Received: by wyb33 with SMTP id 33so79960wyb.19 for ; Thu, 21 Oct 2010 12:21:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition :content-transfer-encoding:user-agent; bh=zmuqXVxxTg0CHvKP3f4s/guI/UK2PsDHz1+lyVVPLzQ=; b=xanvaPK2CR78/HHk05XwXbB+8eO3ivQFVHtdxLdzgNEHS4NDSgj3SNDDmSCVk56Krx LRF+otCnkpHVfoTT74PcKbnRyqkKE13F5sn1XB8ELNc6V9Z/GhXEdOnvRHx5P0imsA9k OV+pL3H1L/lvow+2H1HDXIDL4W5Tq/4dMe3OY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:content-transfer-encoding:user-agent; b=beK1JdUDUSDyp2wzqS/VW8w5MMsyUbOundtbzSIYJcy5EJZx90FKOtcf/4GyqzDWKQ zUjwaTjT1/KcZWxNcxvjWHyxs7jr0IvxcTiPj720fGpxGm19ga02M31OrJPnlyL1ygQY cp/4H3+e+ogPSC1DoK37dNpprEISKV8DyR4Nk= Received: by 10.227.180.10 with SMTP id bs10mr1227622wbb.176.1287688918263; Thu, 21 Oct 2010 12:21:58 -0700 (PDT) Received: from bicker (h3f03.n1.ips.mtn.co.ug [41.210.191.3]) by mx.google.com with ESMTPS id w8sm1307639wei.45.2010.10.21.12.21.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 21 Oct 2010 12:21:56 -0700 (PDT) Date: Thu, 21 Oct 2010 21:21:45 +0200 From: Dan Carpenter To: Mauro Carvalho Chehab Cc: Laurent Pinchart , Hans Verkuil , Istvan Varga , linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] V4L/DVB: cx88: uninitialized variable Message-ID: <20101021192145.GH5985@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sender: Fixes a gcc warning: drivers/media/video/cx88/cx88-video.c:772: warning: ‘core’ may be used uninitialized in this function Signed-off-by: Dan Carpenter --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index 19c64a7..c19ec71 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c @@ -752,7 +752,7 @@ static int video_open(struct file *file) { struct video_device *vdev = video_devdata(file); struct cx8800_dev *dev = video_drvdata(file); - struct cx88_core *core; + struct cx88_core *core = dev->core; struct cx8800_fh *fh; enum v4l2_buf_type type = 0; int radio = 0; @@ -786,7 +786,6 @@ static int video_open(struct file *file) fh->fmt = format_by_fourcc(V4L2_PIX_FMT_BGR24); mutex_lock(&core->lock); - core = dev->core; videobuf_queue_sg_init(&fh->vidq, &cx8800_video_qops, &dev->pci->dev, &dev->slock,