Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=255c1887ccca6cde4a2eac231623b925bf621540
Commit:     255c1887ccca6cde4a2eac231623b925bf621540
Parent:     3b0c453aa78be253b4414cd337c9975f91e2c894
Author:     Michael Krufky <[EMAIL PROTECTED]>
AuthorDate: Thu Nov 22 14:40:25 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 19:02:17 2008 -0200

    V4L/DVB (6622): tda827x: prevent possible NULL pointer dereference in 
tda827xa_lna_gain
    
    If tda827x_config hasn't been defined, exit the function.
    
    Signed-off-by: Michael Krufky <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/dvb/frontends/tda827x.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/frontends/tda827x.c 
b/drivers/media/dvb/frontends/tda827x.c
index 50adfb5..229b119 100644
--- a/drivers/media/dvb/frontends/tda827x.c
+++ b/drivers/media/dvb/frontends/tda827x.c
@@ -556,6 +556,11 @@ static void tda827xa_lna_gain(struct dvb_frontend *fe, int 
high,
        struct i2c_msg msg = { .addr = priv->i2c_addr, .flags = 0,
                               .buf = buf, .len = sizeof(buf) };
 
+       if (NULL == priv->cfg) {
+               dprintk("tda827x_config not defined, cannot set LNA gain!\n");
+               return;
+       }
+
        if (priv->cfg->config) {
                if (high)
                        dprintk("setting LNA to high gain\n");
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to