diff options
author | Holger Waechtler <devnull@localhost> | 2002-11-18 15:58:06 +0000 |
---|---|---|
committer | Holger Waechtler <devnull@localhost> | 2002-11-18 15:58:06 +0000 |
commit | b5627b382ad93a4420d0519a00ad6bd1fffff1f1 (patch) | |
tree | 578d1b4d7e21c0a3091790dad0e860a2d3665671 /linux | |
parent | 1f77e959ed3a552b59017f11e12763f236d207a9 (diff) | |
download | mediapointer-dvb-s2-b5627b382ad93a4420d0519a00ad6bd1fffff1f1.tar.gz mediapointer-dvb-s2-b5627b382ad93a4420d0519a00ad6bd1fffff1f1.tar.bz2 |
fixed a stupid bug introduced by the 2.5.48 changes
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_i2c.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_i2c.c b/linux/drivers/media/dvb/dvb-core/dvb_i2c.c index 3f3c4592e..ce1e9705e 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_i2c.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_i2c.c @@ -64,14 +64,15 @@ static void try_attach_device (struct dvb_i2c_bus *i2c, struct dvb_i2c_device *dev) { if (dev->owner) { - if (try_module_get(dev->owner)) { - if (dev->attach (i2c) == 0) { - register_i2c_client (i2c, dev); - } else { - if (dev->owner) - module_put (dev->owner); - } - } + if (!try_module_get(dev->owner)) + return; + } + + if (dev->attach (i2c) == 0) { + register_i2c_client (i2c, dev); + } else { + if (dev->owner) + module_put (dev->owner); } } |