aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-pnx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c
index bfcd079e885c..882579e64111 100644
--- a/drivers/i2c/busses/i2c-pnx.c
+++ b/drivers/i2c/busses/i2c-pnx.c
@@ -612,8 +612,8 @@ static int __devinit i2c_pnx_probe(struct platform_device *pdev)
612 goto out_clkget; 612 goto out_clkget;
613 } 613 }
614 614
615 if (!(alg_data->ioaddr = 615 alg_data->ioaddr = ioremap(alg_data->base, I2C_PNX_REGION_SIZE);
616 (u32)ioremap(alg_data->base, I2C_PNX_REGION_SIZE))) { 616 if (!alg_data->ioaddr) {
617 dev_err(&pdev->dev, "Couldn't ioremap I2C I/O region\n"); 617 dev_err(&pdev->dev, "Couldn't ioremap I2C I/O region\n");
618 ret = -ENOMEM; 618 ret = -ENOMEM;
619 goto out_release; 619 goto out_release;
@@ -671,7 +671,7 @@ out_irq:
671out_clock: 671out_clock:
672 clk_disable(alg_data->clk); 672 clk_disable(alg_data->clk);
673out_unmap: 673out_unmap:
674 iounmap((void *)alg_data->ioaddr); 674 iounmap(alg_data->ioaddr);
675out_release: 675out_release:
676 release_mem_region(alg_data->base, I2C_PNX_REGION_SIZE); 676 release_mem_region(alg_data->base, I2C_PNX_REGION_SIZE);
677out_clkget: 677out_clkget:
@@ -691,7 +691,7 @@ static int __devexit i2c_pnx_remove(struct platform_device *pdev)
691 free_irq(alg_data->irq, i2c_pnx->adapter); 691 free_irq(alg_data->irq, i2c_pnx->adapter);
692 i2c_del_adapter(adap); 692 i2c_del_adapter(adap);
693 clk_disable(alg_data->clk); 693 clk_disable(alg_data->clk);
694 iounmap((void *)alg_data->ioaddr); 694 iounmap(alg_data->ioaddr);
695 release_mem_region(alg_data->base, I2C_PNX_REGION_SIZE); 695 release_mem_region(alg_data->base, I2C_PNX_REGION_SIZE);
696 clk_put(alg_data->clk); 696 clk_put(alg_data->clk);
697 platform_set_drvdata(pdev, NULL); 697 platform_set_drvdata(pdev, NULL);