Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a2e521e85c04af3511af3ea8971efb4ef8bde533
Commit:     a2e521e85c04af3511af3ea8971efb4ef8bde533
Parent:     188f3457c21ac7869005021b56b4578293c644bb
Author:     Hans Verkuil <[EMAIL PROTECTED]>
AuthorDate: Mon Sep 17 05:13:45 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 19:01:28 2008 -0200

    V4L/DVB (6466): v4l2-i2c-drv: first call remove, then detach client
    
    The remove driver function expects that the client is still attached
    to the driver, so do the detach after calling remove().
    
    Signed-off-by: Hans Verkuil <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 include/media/v4l2-i2c-drv-legacy.h |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/include/media/v4l2-i2c-drv-legacy.h 
b/include/media/v4l2-i2c-drv-legacy.h
index 433c984..2418542 100644
--- a/include/media/v4l2-i2c-drv-legacy.h
+++ b/include/media/v4l2-i2c-drv-legacy.h
@@ -58,12 +58,14 @@ static int v4l2_i2c_drv_probe_legacy(struct i2c_adapter 
*adapter)
 
 static int v4l2_i2c_drv_detach_legacy(struct i2c_client *client)
 {
-       int err = i2c_detach_client(client);
+       int err;
 
-       if (err)
-               return err;
        if (v4l2_i2c_data.remove)
                v4l2_i2c_data.remove(client);
+
+       err = i2c_detach_client(client);
+       if (err)
+               return err;
        kfree(client);
 
        return 0;
-
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