From patchwork Sat Mar 20 14:12:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 87134 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2KEICVe000344 for ; Sat, 20 Mar 2010 14:18:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752611Ab0CTOSJ (ORCPT ); Sat, 20 Mar 2010 10:18:09 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:59093 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752592Ab0CTOOm (ORCPT ); Sat, 20 Mar 2010 10:14:42 -0400 Received: from themisto.ext.pengutronix.de ([92.198.50.58] helo=pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.71) (envelope-from ) id 1NszRi-0004DF-8l; Sat, 20 Mar 2010 15:14:37 +0100 From: Wolfram Sang To: kernel-janitors@vger.kernel.org Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Wolfram Sang , Mauro Carvalho Chehab , linux-media@vger.kernel.org Date: Sat, 20 Mar 2010 15:12:51 +0100 Message-Id: <1269094385-16114-11-git-send-email-w.sang@pengutronix.de> X-Mailer: git-send-email 1.7.0 In-Reply-To: <1269094385-16114-1-git-send-email-w.sang@pengutronix.de> References: <1269094385-16114-1-git-send-email-w.sang@pengutronix.de> X-SA-Exim-Connect-IP: 92.198.50.58 X-SA-Exim-Mail-From: w.sang@pengutronix.de X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on metis.extern.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=4.5 tests=AWL,BAYES_00, KHOP_SC_TOP_CIDR8,T_RP_MATCHES_RCVD shortcircuit=no autolearn=ham version=3.3.0 Subject: [PATCH 10/24] media/radio: fix dangling pointers X-SA-Exim-Version: 4.2.1 (built Sat, 01 Aug 2009 12:09:26 +0000) X-SA-Exim-Scanned: Yes (on metis.ext.pengutronix.de) X-PTX-Original-Recipient: linux-media@vger.kernel.org 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 (demeter.kernel.org [140.211.167.41]); Sat, 20 Mar 2010 14:18:13 +0000 (UTC) diff --git a/drivers/media/radio/radio-tea5764.c b/drivers/media/radio/radio-tea5764.c index 8e718bf..8a6be0a 100644 --- a/drivers/media/radio/radio-tea5764.c +++ b/drivers/media/radio/radio-tea5764.c @@ -571,6 +571,7 @@ static int __devinit tea5764_i2c_probe(struct i2c_client *client, return 0; errrel: video_device_release(radio->videodev); + i2c_set_clientdata(client, NULL); errfr: kfree(radio); return ret; @@ -584,6 +585,7 @@ static int __devexit tea5764_i2c_remove(struct i2c_client *client) if (radio) { tea5764_power_down(radio); video_unregister_device(radio->videodev); + i2c_set_clientdata(client, NULL); kfree(radio); } return 0;