From: zhong jiang Date: Thu, 20 Sep 2018 19:17:44 +0000 (-0600) Subject: coresight: Use ERR_CAST instead of ERR_PTR X-Git-Tag: v5.4-rc1~2359^2~172 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bbd35ba6fab5419e58e96f35f1431f13bdc14f98;p=platform%2Fkernel%2Flinux-rpi.git coresight: Use ERR_CAST instead of ERR_PTR Use ERR_CAT inlined function to replace the ERR_PTR(PTR_ERR). It make the code more concise. Signed-off-by: zhong jiang Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c b/drivers/hwtracing/coresight/coresight-tmc-etr.c index 2eda5de..11963647 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;