Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1808a698a87366f9d82945270355c2139df0a16d Commit: 1808a698a87366f9d82945270355c2139df0a16d Parent: 882876bf9780fac570184b719a76140a1b1e4178 Author: Mauro Carvalho Chehab <[EMAIL PROTECTED]> AuthorDate: Mon Oct 29 17:38:59 2007 -0300 Committer: Mauro Carvalho Chehab <[EMAIL PROTECTED]> CommitDate: Fri Jan 25 19:01:35 2008 -0200
V4L/DVB (6475): Fix some troubles at list handling - priv->count were wrong. Should be incremented since the first usage; - forgot to use list_del() to remove the driver; - Release memory if an error occurs during _attach Thanks to Aidan Thornton <[EMAIL PROTECTED]> for pointing this. Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]> --- drivers/media/video/tuner-xc2028.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/media/video/tuner-xc2028.c b/drivers/media/video/tuner-xc2028.c index 7d53d58..c5bdeff 100644 --- a/drivers/media/video/tuner-xc2028.c +++ b/drivers/media/video/tuner-xc2028.c @@ -639,6 +639,8 @@ static int xc2028_dvb_release(struct dvb_frontend *fe) priv->count--; if (!priv->count) { + list_del(&priv->xc2028_list); + if (priv->ctrl.fname) kfree(priv->ctrl.fname); @@ -728,7 +730,6 @@ int xc2028_attach(struct dvb_frontend *fe, struct i2c_adapter* i2c_adap, list_for_each_entry(priv, &xc2028_list, xc2028_list) { if (priv->dev == dev) { dev = NULL; - priv->count++; } } @@ -754,6 +755,7 @@ int xc2028_attach(struct dvb_frontend *fe, struct i2c_adapter* i2c_adap, list_add_tail(&priv->xc2028_list,&xc2028_list); } + priv->count++; memcpy(&fe->ops.tuner_ops, &xc2028_dvb_tuner_ops, sizeof(xc2028_dvb_tuner_ops)); - 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