summaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-imx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pwm/pwm-imx.c')
-rw-r--r--drivers/pwm/pwm-imx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c
index e29341f8ec..fbfc3af0cd 100644
--- a/drivers/pwm/pwm-imx.c
+++ b/drivers/pwm/pwm-imx.c
@@ -14,6 +14,7 @@
#include <io.h>
#include <pwm.h>
#include <linux/clk.h>
+#include <linux/err.h>
#include <asm-generic/div64.h>
/* i.MX1 and i.MX21 share the same PWM function block: */
@@ -237,8 +238,8 @@ static int imx_pwm_probe(struct device_d *dev)
}
imx->mmio_base = dev_request_mem_region(dev, 0);
- if (!imx->mmio_base)
- return -EBUSY;
+ if (IS_ERR(imx->mmio_base))
+ return PTR_ERR(imx->mmio_base);
imx->config = data->config;
imx->set_enable = data->set_enable;