diff options
Diffstat (limited to 'drivers/mfd/t7l66xb.c')
-rw-r--r-- | drivers/mfd/t7l66xb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c index bcf4687d4af5..26d9176fca91 100644 --- a/drivers/mfd/t7l66xb.c +++ b/drivers/mfd/t7l66xb.c | |||
@@ -360,7 +360,7 @@ static int t7l66xb_probe(struct platform_device *dev) | |||
360 | if (ret) | 360 | if (ret) |
361 | goto err_request_scr; | 361 | goto err_request_scr; |
362 | 362 | ||
363 | t7l66xb->scr = ioremap(rscr->start, rscr->end - rscr->start + 1); | 363 | t7l66xb->scr = ioremap(rscr->start, resource_size(rscr)); |
364 | if (!t7l66xb->scr) { | 364 | if (!t7l66xb->scr) { |
365 | ret = -ENOMEM; | 365 | ret = -ENOMEM; |
366 | goto err_ioremap; | 366 | goto err_ioremap; |
@@ -403,12 +403,12 @@ static int t7l66xb_probe(struct platform_device *dev) | |||
403 | err_ioremap: | 403 | err_ioremap: |
404 | release_resource(&t7l66xb->rscr); | 404 | release_resource(&t7l66xb->rscr); |
405 | err_request_scr: | 405 | err_request_scr: |
406 | kfree(t7l66xb); | ||
407 | clk_put(t7l66xb->clk48m); | 406 | clk_put(t7l66xb->clk48m); |
408 | err_clk48m_get: | 407 | err_clk48m_get: |
409 | clk_put(t7l66xb->clk32k); | 408 | clk_put(t7l66xb->clk32k); |
410 | err_clk32k_get: | 409 | err_clk32k_get: |
411 | err_noirq: | 410 | err_noirq: |
411 | kfree(t7l66xb); | ||
412 | return ret; | 412 | return ret; |
413 | } | 413 | } |
414 | 414 | ||