summaryrefslogtreecommitdiffstats
path: root/drivers/hwtracing/intel_th
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-10-16 16:09:13 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-17 08:25:48 +0200
commit73061da07d28ac6724bcd9ce4b51cf51a8b6b40e (patch)
treebda6bd37fb26f21fa47d6e49de3483e124952ed4 /drivers/hwtracing/intel_th
parentstm class: Select configfs (diff)
downloadlinux-73061da07d28ac6724bcd9ce4b51cf51a8b6b40e.tar.xz
linux-73061da07d28ac6724bcd9ce4b51cf51a8b6b40e.zip
intel_th: Check for NULL instead of ERR_PTR
devm_ioremap() returns NULL on error, it doesn't return an ERR_PTR, which is what the current code does. This patch corrects these checks. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing/intel_th')
-rw-r--r--drivers/hwtracing/intel_th/gth.c4
-rw-r--r--drivers/hwtracing/intel_th/msu.c4
-rw-r--r--drivers/hwtracing/intel_th/pti.c4
-rw-r--r--drivers/hwtracing/intel_th/sth.c8
4 files changed, 10 insertions, 10 deletions
diff --git a/drivers/hwtracing/intel_th/gth.c b/drivers/hwtracing/intel_th/gth.c
index 673d272ee400..2dc5378ccd3a 100644
--- a/drivers/hwtracing/intel_th/gth.c
+++ b/drivers/hwtracing/intel_th/gth.c
@@ -635,8 +635,8 @@ static int intel_th_gth_probe(struct intel_th_device *thdev)
return -ENODEV;
base = devm_ioremap(dev, res->start, resource_size(res));
- if (IS_ERR(base))
- return PTR_ERR(base);
+ if (!base)
+ return -ENOMEM;
gth = devm_kzalloc(dev, sizeof(*gth), GFP_KERNEL);
if (!gth)
diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c
index 80a12384ed20..70ca27e45602 100644
--- a/drivers/hwtracing/intel_th/msu.c
+++ b/drivers/hwtracing/intel_th/msu.c
@@ -1458,8 +1458,8 @@ static int intel_th_msc_probe(struct intel_th_device *thdev)
return -ENODEV;
base = devm_ioremap(dev, res->start, resource_size(res));
- if (IS_ERR(base))
- return PTR_ERR(base);
+ if (!base)
+ return -ENOMEM;
msc = devm_kzalloc(dev, sizeof(*msc), GFP_KERNEL);
if (!msc)
diff --git a/drivers/hwtracing/intel_th/pti.c b/drivers/hwtracing/intel_th/pti.c
index 1e3bbc89825c..57cbfdcc7ef0 100644
--- a/drivers/hwtracing/intel_th/pti.c
+++ b/drivers/hwtracing/intel_th/pti.c
@@ -207,8 +207,8 @@ static int intel_th_pti_probe(struct intel_th_device *thdev)
return -ENODEV;
base = devm_ioremap(dev, res->start, resource_size(res));
- if (IS_ERR(base))
- return PTR_ERR(base);
+ if (!base)
+ return -ENOMEM;
pti = devm_kzalloc(dev, sizeof(*pti), GFP_KERNEL);
if (!pti)
diff --git a/drivers/hwtracing/intel_th/sth.c b/drivers/hwtracing/intel_th/sth.c
index e488fccbfdec..56101c33e10f 100644
--- a/drivers/hwtracing/intel_th/sth.c
+++ b/drivers/hwtracing/intel_th/sth.c
@@ -194,16 +194,16 @@ static int intel_th_sth_probe(struct intel_th_device *thdev)
return -ENODEV;
base = devm_ioremap(dev, res->start, resource_size(res));
- if (IS_ERR(base))
- return PTR_ERR(base);
+ if (!base)
+ return -ENOMEM;
res = intel_th_device_get_resource(thdev, IORESOURCE_MEM, 1);
if (!res)
return -ENODEV;
channels = devm_ioremap(dev, res->start, resource_size(res));
- if (IS_ERR(channels))
- return PTR_ERR(channels);
+ if (!channels)
+ return -ENOMEM;
sth = devm_kzalloc(dev, sizeof(*sth), GFP_KERNEL);
if (!sth)