This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/v4l-dvb.git tree:

Subject: V4L/DVB: dvb/stv6110x: cleanup error handling
Author:  Dan Carpenter <[email protected]>
Date:    Wed May 5 02:58:18 2010 -0300

The "stv6110x" is NULL so we can just return directly without calling
kfree().  Also I changed the printk() to make checkpatch.pl happy.

Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Manu Abraham <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/dvb/frontends/stv6110x.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

---

http://git.linuxtv.org/v4l-dvb.git?a=commitdiff;h=0b99c24e8954433e13233f5a19cfc209884892e9

diff --git a/drivers/media/dvb/frontends/stv6110x.c 
b/drivers/media/dvb/frontends/stv6110x.c
index 4fa2ce8..5f03b56 100644
--- a/drivers/media/dvb/frontends/stv6110x.c
+++ b/drivers/media/dvb/frontends/stv6110x.c
@@ -362,8 +362,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;
@@ -391,12 +391,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);
 

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to