]> err.no Git - linux-2.6/commitdiff
[ARM] 3079/1: Fix typo in i2c-iop3xx.c (invalid pointer passed to release_mem_region)
authorDan Williams <dan.j.williams@gmail.com>
Tue, 1 Nov 2005 22:31:12 +0000 (22:31 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 1 Nov 2005 22:31:12 +0000 (22:31 +0000)
Patch from Dan Williams

* If request_irq fails then a call to release_mem_region will be made with an invalid pointer.
* Two formatting fixes

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/i2c/busses/i2c-iop3xx.c

index 9888fae1f37a8f90ea34fd658573162e08b0007c..53c6494451020d88613c7f229f04fa043c329b0e 100644 (file)
@@ -11,7 +11,7 @@
  *
  * Copyright (C) 1995-1997 Simon G. Vogl, 1998-2000 Hans Berglund
  *  
- * And which acknowledged Kyösti Mälkki <kmalkki@cc.hut.fi>,
+ * And which acknowledged Kyösti Mälkki <kmalkki@cc.hut.fi>,
  * Frodo Looijaard <frodol@dds.nl>, Martin Bailey<mbailey@littlefeet-inc.com>
  *
  * Major cleanup by Deepak Saxena <dsaxena@plexity.net>, 01/2005:
@@ -184,7 +184,7 @@ iop3xx_i2c_wait_event(struct i2c_algo_iop3xx_data *iop3xx_adap,
        do {
                interrupted = wait_event_interruptible_timeout (
                        iop3xx_adap->waitq,
-                       (done = compare( sr = iop3xx_i2c_get_srstat(iop3xx_adap)                                        ,flags )),
+                       (done = compare( sr = iop3xx_i2c_get_srstat(iop3xx_adap) ,flags )),
                        1 * HZ;
                        );
                if ((rc = iop3xx_i2c_error(sr)) < 0) {
@@ -472,9 +472,10 @@ iop3xx_i2c_probe(struct device *dev)
                goto release_region;
        }
 
-       res = request_irq(platform_get_irq(pdev, 0), iop3xx_i2c_irq_handler, 0, 
+       ret = request_irq(platform_get_irq(pdev, 0), iop3xx_i2c_irq_handler, 0,
                                pdev->name, adapter_data);
-       if (res) {
+
+       if (ret) {
                ret = -EIO;
                goto unmap;
        }