From patchwork Thu Aug 4 10:29:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 246 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Thu, 04 Aug 2011 10:31:06 +0000 Received: from casper.infradead.org [85.118.1.10] by localhost.localdomain with IMAP (fetchmail-6.3.17) for (single-drop); Thu, 04 Aug 2011 08:55:45 -0300 (BRT) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QovCk-0006GF-CB; Thu, 04 Aug 2011 10:31:06 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753592Ab1HDK34 (ORCPT + 1 other); Thu, 4 Aug 2011 06:29:56 -0400 Received: from mgw2.diku.dk ([130.225.96.92]:59168 "EHLO mgw2.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753772Ab1HDK3n (ORCPT ); Thu, 4 Aug 2011 06:29:43 -0400 Received: from localhost (localhost [127.0.0.1]) by mgw2.diku.dk (Postfix) with ESMTP id 2AB3319BBFD; Thu, 4 Aug 2011 12:29:41 +0200 (CEST) Received: from mgw2.diku.dk ([127.0.0.1]) by localhost (mgw2.diku.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 29780-18; Thu, 4 Aug 2011 12:29:34 +0200 (CEST) Received: from palace.topps.diku.dk (palace.ekstranet.diku.dk [192.38.115.202]) by mgw2.diku.dk (Postfix) with ESMTP id AF6B419BC0B; Thu, 4 Aug 2011 12:29:34 +0200 (CEST) From: Julia Lawall To: Mauro Carvalho Chehab Cc: kernel-janitors@vger.kernel.org, Paul Gortmaker , Lucas De Marchi , Jean Delvare , Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] drivers/media/video/hexium_gemini.c: delete useless initialization Date: Thu, 4 Aug 2011 12:29:33 +0200 Message-Id: <1312453774-23333-4-git-send-email-julia@diku.dk> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1312453774-23333-1-git-send-email-julia@diku.dk> References: <1312453774-23333-1-git-send-email-julia@diku.dk> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Julia Lawall Delete nontrivial initialization that is immediately overwritten by the result of an allocation function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ type T; identifier i; expression e; @@ ( T i = \(0\|NULL\|ERR_PTR(...)\); | -T i = e; +T i; ) ... when != i i = \(kzalloc\|kcalloc\|kmalloc\)(...); // Signed-off-by: Julia Lawall Acked-by: Jean Delvare --- drivers/media/video/hexium_gemini.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 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 -u -p a/drivers/media/video/hexium_gemini.c b/drivers/media/video/hexium_gemini.c --- a/drivers/media/video/hexium_gemini.c +++ b/drivers/media/video/hexium_gemini.c @@ -352,7 +352,7 @@ static struct saa7146_ext_vv vv_data; /* this function only gets called when the probing was successful */ static int hexium_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data *info) { - struct hexium *hexium = (struct hexium *) dev->ext_priv; + struct hexium *hexium; int ret; DEB_EE((".\n"));