Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344458
b: refs/heads/master
c: 50e5194
h: refs/heads/master
v: v3
  • Loading branch information
Jingoo Han authored and Bryan Wu committed Nov 26, 2012
1 parent 0ec58a8 commit e0e0a3d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aa2dcf9dc150d4d077d8fa4a19f6e05196e9b9a5
refs/heads/master: 50e5194385a7be0f3c6b1f97749854cf29562619
11 changes: 4 additions & 7 deletions trunk/drivers/leds/leds-cobalt-raq.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ static int __devinit cobalt_raq_led_probe(struct platform_device *pdev)
if (!res)
return -EBUSY;

led_port = ioremap(res->start, resource_size(res));
led_port = devm_ioremap(&pdev->dev, res->start, resource_size(res));
if (!led_port)
return -ENOMEM;

retval = led_classdev_register(&pdev->dev, &raq_power_off_led);
if (retval)
goto err_iounmap;
goto err_null;

retval = led_classdev_register(&pdev->dev, &raq_web_led);
if (retval)
Expand All @@ -102,8 +102,7 @@ static int __devinit cobalt_raq_led_probe(struct platform_device *pdev)
err_unregister:
led_classdev_unregister(&raq_power_off_led);

err_iounmap:
iounmap(led_port);
err_null:
led_port = NULL;

return retval;
Expand All @@ -114,10 +113,8 @@ static int __devexit cobalt_raq_led_remove(struct platform_device *pdev)
led_classdev_unregister(&raq_power_off_led);
led_classdev_unregister(&raq_web_led);

if (led_port) {
iounmap(led_port);
if (led_port)
led_port = NULL;
}

return 0;
}
Expand Down

0 comments on commit e0e0a3d

Please sign in to comment.