diff options
author | Dan Williams <dan.j.williams@gmail.com> | 2005-11-01 17:31:12 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-11-01 17:31:12 -0500 |
commit | fbd9a6d7a927b2059d1d65441384ffb095f68e58 (patch) | |
tree | 07e89086834221152aec688feb9756b6d5ce5c35 /drivers/i2c/busses | |
parent | d01e8897fcf597f62d84f626fdced8d94c70deaf (diff) |
[ARM] 3079/1: Fix typo in i2c-iop3xx.c (invalid pointer passed to release_mem_region)
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>
Diffstat (limited to 'drivers/i2c/busses')
-rw-r--r-- | drivers/i2c/busses/i2c-iop3xx.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-iop3xx.c b/drivers/i2c/busses/i2c-iop3xx.c index 9888fae1f37a..53c649445102 100644 --- a/drivers/i2c/busses/i2c-iop3xx.c +++ b/drivers/i2c/busses/i2c-iop3xx.c | |||
@@ -11,7 +11,7 @@ | |||
11 | * | 11 | * |
12 | * Copyright (C) 1995-1997 Simon G. Vogl, 1998-2000 Hans Berglund | 12 | * Copyright (C) 1995-1997 Simon G. Vogl, 1998-2000 Hans Berglund |
13 | * | 13 | * |
14 | * And which acknowledged Kyösti Mälkki <kmalkki@cc.hut.fi>, | 14 | * And which acknowledged Kyösti Mälkki <kmalkki@cc.hut.fi>, |
15 | * Frodo Looijaard <frodol@dds.nl>, Martin Bailey<mbailey@littlefeet-inc.com> | 15 | * Frodo Looijaard <frodol@dds.nl>, Martin Bailey<mbailey@littlefeet-inc.com> |
16 | * | 16 | * |
17 | * Major cleanup by Deepak Saxena <dsaxena@plexity.net>, 01/2005: | 17 | * 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, | |||
184 | do { | 184 | do { |
185 | interrupted = wait_event_interruptible_timeout ( | 185 | interrupted = wait_event_interruptible_timeout ( |
186 | iop3xx_adap->waitq, | 186 | iop3xx_adap->waitq, |
187 | (done = compare( sr = iop3xx_i2c_get_srstat(iop3xx_adap) ,flags )), | 187 | (done = compare( sr = iop3xx_i2c_get_srstat(iop3xx_adap) ,flags )), |
188 | 1 * HZ; | 188 | 1 * HZ; |
189 | ); | 189 | ); |
190 | if ((rc = iop3xx_i2c_error(sr)) < 0) { | 190 | if ((rc = iop3xx_i2c_error(sr)) < 0) { |
@@ -472,9 +472,10 @@ iop3xx_i2c_probe(struct device *dev) | |||
472 | goto release_region; | 472 | goto release_region; |
473 | } | 473 | } |
474 | 474 | ||
475 | res = request_irq(platform_get_irq(pdev, 0), iop3xx_i2c_irq_handler, 0, | 475 | ret = request_irq(platform_get_irq(pdev, 0), iop3xx_i2c_irq_handler, 0, |
476 | pdev->name, adapter_data); | 476 | pdev->name, adapter_data); |
477 | if (res) { | 477 | |
478 | if (ret) { | ||
478 | ret = -EIO; | 479 | ret = -EIO; |
479 | goto unmap; | 480 | goto unmap; |
480 | } | 481 | } |