From patchwork Wed Jan 19 14:27:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 489021 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 p0JEuJD6010815 for ; Wed, 19 Jan 2011 17:15:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754331Ab1ASO20 (ORCPT ); Wed, 19 Jan 2011 09:28:26 -0500 Received: from mail-wy0-f174.google.com ([74.125.82.174]:62700 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754259Ab1ASO2Y (ORCPT ); Wed, 19 Jan 2011 09:28:24 -0500 Received: by wyb28 with SMTP id 28so991689wyb.19 for ; Wed, 19 Jan 2011 06:28:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:from:to:cc:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=DL5mAqGqZyZlG+RukewP5C2JB0tjBq19Qqhdx6iM5U8=; b=K7ZcnkU+4ogfYksjgxzMp8SZNqZIyQ7E0jFTXqiSTPLt1McW05pHpvzcKpKQpbm/mU 2Xbm28wTejR0epyk6hqYh2Js0gvIeRwXvrWlhWhMJsrgeIAvYExHqdtskLBhVybUoqxU AOrgdVbW7s9FfVItgtXVU/s2QkiBEQGYvg0Dc= 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:user-agent; b=Cx28EbULVz8dpeKVr25ZdaWFaM+64IQai5ZC+fw4LicIwzP9QgyTGRfWCl9MTdfP0H aeAEiQnPUBtc/R2o2DsPxxwyUGijqIAWbA7F2M45faNb2YjVXqKAPu05yK1i+OrmrcH3 kgjhb2oSIuJx7OqB7qOhnaGh8gfjPtDf5zKiU= Received: by 10.227.142.17 with SMTP id o17mr871456wbu.111.1295447286940; Wed, 19 Jan 2011 06:28:06 -0800 (PST) Received: from bicker ([41.202.225.146]) by mx.google.com with ESMTPS id m13sm5144938wbz.21.2011.01.19.06.28.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 19 Jan 2011 06:28:05 -0800 (PST) Date: Wed, 19 Jan 2011 17:27:58 +0300 From: Dan Carpenter To: Mauro Carvalho Chehab Cc: Patrick Boettcher , Olivier Grenie , linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch 1/2] [media] dib8000: fix small memory leak on error Message-ID: <20110119142758.GO2721@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) 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]); Wed, 19 Jan 2011 17:16:05 +0000 (UTC) diff --git a/drivers/media/dvb/frontends/dib8000.c b/drivers/media/dvb/frontends/dib8000.c index 3e20aa8..c1c3e26 100644 --- a/drivers/media/dvb/frontends/dib8000.c +++ b/drivers/media/dvb/frontends/dib8000.c @@ -2514,7 +2514,7 @@ struct dvb_frontend *dib8000_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, s return NULL; fe = kzalloc(sizeof(struct dvb_frontend), GFP_KERNEL); if (fe == NULL) - return NULL; + goto error; memcpy(&state->cfg, cfg, sizeof(struct dib8000_config)); state->i2c.adap = i2c_adap;