]> err.no Git - linux-2.6/blobdiff - Documentation/i2c/writing-clients
Merge branch 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block
[linux-2.6] / Documentation / i2c / writing-clients
index cff7b652588a6c1153c5d49f048db20ff1d3efcf..d19993cc06041878f3c3d78979b55213c4ee75a9 100644 (file)
@@ -412,7 +412,7 @@ For now, you can ignore the `flags' parameter. It is there for future use.
         release_region(address,FOO_EXTENT);
     /* SENSORS ONLY END */
     ERROR1:
-      kfree(new_client);
+      kfree(data);
     ERROR0:
       return err;
   }
@@ -443,7 +443,7 @@ much simpler than the attachment code, fortunately!
       release_region(client->addr,LM78_EXTENT);
     /* HYBRID SENSORS CHIP ONLY END */
 
-    kfree(data);
+    kfree(i2c_get_clientdata(client));
     return 0;
   }