From: zhong jiang <zhongji...@huawei.com>

Use ERR_CAT inlined function to replace the ERR_PTR(PTR_ERR). It
make the code more concise.

Signed-off-by: zhong jiang <zhongji...@huawei.com>
Signed-off-by: Mathieu Poirier <mathieu.poir...@linaro.org>
---
 drivers/hwtracing/coresight/coresight-tmc-etr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c 
b/drivers/hwtracing/coresight/coresight-tmc-etr.c
index 2eda5de304c2..11963647e19a 100644
--- a/drivers/hwtracing/coresight/coresight-tmc-etr.c
+++ b/drivers/hwtracing/coresight/coresight-tmc-etr.c
@@ -536,7 +536,7 @@ tmc_init_etr_sg_table(struct device *dev, int node,
        sg_table = tmc_alloc_sg_table(dev, node, nr_tpages, nr_dpages, pages);
        if (IS_ERR(sg_table)) {
                kfree(etr_table);
-               return ERR_PTR(PTR_ERR(sg_table));
+               return ERR_CAST(sg_table);
        }
 
        etr_table->sg_table = sg_table;
-- 
2.7.4

Reply via email to