Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit daa4379b authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "coresight: tmc: Remove useless NULL pointer check"

parents 09b9f72c 12d6ef6d
Loading
Loading
Loading
Loading
+7 −11
Original line number Diff line number Diff line
@@ -412,14 +412,12 @@ static int tmc_probe(struct amba_device *adev, const struct amba_id *id)
	struct coresight_desc desc = { 0 };
	struct device_node *np = adev->dev.of_node;

	if (np) {
	pdata = of_get_coresight_platform_data(dev, np);
	if (IS_ERR(pdata)) {
		ret = PTR_ERR(pdata);
		goto out;
	}
	adev->dev.platform_data = pdata;
	}

	ret = -ENOMEM;
	drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
@@ -445,9 +443,7 @@ static int tmc_probe(struct amba_device *adev, const struct amba_id *id)
	drvdata->memwidth = tmc_get_memwidth(devid);

	if (drvdata->config_type == TMC_CONFIG_TYPE_ETR) {
		if (np)
			ret = of_property_read_u32(np,
						   "arm,buffer-size",
		ret = of_property_read_u32(np, "arm,buffer-size",
					   &drvdata->size);
		if (ret)
			drvdata->size = SZ_1M;