From: Jie Gan Date: Fri, 7 Nov 2025 06:16:39 +0000 (+0800) Subject: coresight: tpdm: remove redundant check for drvdata X-Git-Tag: v6.19-rc1~65^2~56^2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa5edd1b5ece68aa806b2af6508b4b8006026da0;p=thirdparty%2Fkernel%2Flinux.git coresight: tpdm: remove redundant check for drvdata Remove the redundant check for drvdata data because the drvdata here already has been guarranted to be non-NULL. Signed-off-by: Jie Gan Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20251107-fix_tpdm_redundant_check-v1-1-b63468a2dd73@oss.qualcomm.com --- diff --git a/drivers/hwtracing/coresight/coresight-tpdm.c b/drivers/hwtracing/coresight/coresight-tpdm.c index 0e3896c12f070..06e0a905a67d7 100644 --- a/drivers/hwtracing/coresight/coresight-tpdm.c +++ b/drivers/hwtracing/coresight/coresight-tpdm.c @@ -1402,11 +1402,11 @@ static int tpdm_probe(struct device *dev, struct resource *res) if (ret) return ret; - if (drvdata && tpdm_has_dsb_dataset(drvdata)) + if (tpdm_has_dsb_dataset(drvdata)) of_property_read_u32(drvdata->dev->of_node, "qcom,dsb-msrs-num", &drvdata->dsb_msr_num); - if (drvdata && tpdm_has_cmb_dataset(drvdata)) + if (tpdm_has_cmb_dataset(drvdata)) of_property_read_u32(drvdata->dev->of_node, "qcom,cmb-msrs-num", &drvdata->cmb_msr_num); } else {