From patchwork Wed May 5 05:58:18 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 96983 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 o455wT5H027689 for ; Wed, 5 May 2010 05:58:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754390Ab0EEF61 (ORCPT ); Wed, 5 May 2010 01:58:27 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:58571 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753747Ab0EEF60 (ORCPT ); Wed, 5 May 2010 01:58:26 -0400 Received: by fxm10 with SMTP id 10so3899754fxm.19 for ; Tue, 04 May 2010 22:58:25 -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:user-agent; bh=te2PW9i0sIihwbgmXnFiOjewM/krg6sjeCr5cl9jSDc=; b=khq01zNmNWhxjIMd9Y/in0t6s40Iwptj49ugMhnYr4pZun/ZVcx/n42MfAQenD6JXo tMHGFh7PU003uaAycrRMxvvH+Da/wt1QWi+c9x0UXF8ptHXP/cqxmP5qvKGHUjGlhX0K DEo/La51eNXw5758uon2vfqjzzF05jwLKVQpo= 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=rigOO7hLxnlulYPuhm6thEOr5TYgAV/d7kjV7OXB8sU3NgCoWI8KNKqsWi/r+nEs9X tZOR2dzUtlT/WtIbAabUPNKWVEvTgNf138UgUvXymzTYDuRPIOBITuZGWs4yCZutOR8v sPDg32b1A4vaeZjsDFqwZz6RhauzBLefKXbuM= Received: by 10.223.68.13 with SMTP id t13mr4972797fai.69.1273039104987; Tue, 04 May 2010 22:58:24 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id z15sm12668213fkz.51.2010.05.04.22.58.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 04 May 2010 22:58:24 -0700 (PDT) Date: Wed, 5 May 2010 07:58:18 +0200 From: Dan Carpenter To: linux-media@vger.kernel.org Cc: Manu Abraham , Mauro Carvalho Chehab Subject: [patch -next] dvb/stv6110x: cleanup error handling Message-ID: <20100505055818.GC27064@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) 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]); Wed, 05 May 2010 05:58:29 +0000 (UTC) diff --git a/drivers/media/dvb/frontends/stv6110x.c b/drivers/media/dvb/frontends/stv6110x.c index 2f9cd24..42591ce 100644 --- a/drivers/media/dvb/frontends/stv6110x.c +++ b/drivers/media/dvb/frontends/stv6110x.c @@ -363,8 +363,8 @@ struct stv6110x_devctl *stv6110x_attach(struct dvb_frontend *fe, u8 default_regs[] = {0x07, 0x11, 0xdc, 0x85, 0x17, 0x01, 0xe6, 0x1e}; stv6110x = kzalloc(sizeof (struct stv6110x_state), GFP_KERNEL); - if (stv6110x == NULL) - goto error; + if (!stv6110x) + return NULL; stv6110x->i2c = i2c; stv6110x->config = config; @@ -392,12 +392,8 @@ struct stv6110x_devctl *stv6110x_attach(struct dvb_frontend *fe, fe->tuner_priv = stv6110x; fe->ops.tuner_ops = stv6110x_ops; - printk("%s: Attaching STV6110x \n", __func__); + printk(KERN_INFO "%s: Attaching STV6110x\n", __func__); return stv6110x->devctl; - -error: - kfree(stv6110x); - return NULL; } EXPORT_SYMBOL(stv6110x_attach);