Commit 0ba74fbb authored by Antonino Daplas's avatar Antonino Daplas Committed by Linus Torvalds

[PATCH] fbdev: Do a symbol_put for each symbol_get in savagefb

Do a symbol_put() for each symbol_get() in savagefb.
Signed-off-by: default avatarAntonino Daplas <adaplas@pol.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d699c1bb
......@@ -163,12 +163,15 @@ static int savage_setup_i2c_bus(struct savagefb_i2c_chan *chan,
udelay(20);
rc = add_bus(&chan->adapter);
if (rc == 0)
dev_dbg(&chan->par->pcidev->dev,
"I2C bus %s registered.\n", name);
else
dev_warn(&chan->par->pcidev->dev,
"Failed to register I2C bus %s.\n", name);
symbol_put(i2c_bit_add_bus);
} else
chan->par = NULL;
......@@ -212,8 +215,10 @@ void savagefb_delete_i2c_busses(struct fb_info *info)
int (*del_bus)(struct i2c_adapter *) =
symbol_get(i2c_bit_del_bus);
if (del_bus && par->chan.par)
if (del_bus && par->chan.par) {
del_bus(&par->chan.adapter);
symbol_put(i2c_bit_del_bus);
}
par->chan.par = NULL;
}
......@@ -239,6 +244,7 @@ static u8 *savage_do_probe_i2c_edid(struct savagefb_i2c_chan *chan)
if (transfer && chan->par) {
buf = kmalloc(EDID_LENGTH, GFP_KERNEL);
if (buf) {
msgs[1].buf = buf;
......@@ -249,6 +255,8 @@ static u8 *savage_do_probe_i2c_edid(struct savagefb_i2c_chan *chan)
buf = NULL;
}
}
symbol_put(i2c_transfer);
}
return buf;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment