Merge remote-tracking branch 'char-misc/char-misc-next'
[deliverable/linux.git] / drivers / hwtracing / coresight / coresight-tpiu.c
index 4e471e2e9d896df24399c9e02cdd06a463ac27be..0673baf0f2f5b93bbe9c14c2a7c9a7d390f338b7 100644 (file)
@@ -119,7 +119,7 @@ static int tpiu_probe(struct amba_device *adev, const struct amba_id *id)
        struct coresight_platform_data *pdata = NULL;
        struct tpiu_drvdata *drvdata;
        struct resource *res = &adev->res;
-       struct coresight_desc *desc;
+       struct coresight_desc desc = { 0 };
        struct device_node *np = adev->dev.of_node;
 
        if (np) {
@@ -154,16 +154,12 @@ static int tpiu_probe(struct amba_device *adev, const struct amba_id *id)
 
        pm_runtime_put(&adev->dev);
 
-       desc = devm_kzalloc(dev, sizeof(*desc), GFP_KERNEL);
-       if (!desc)
-               return -ENOMEM;
-
-       desc->type = CORESIGHT_DEV_TYPE_SINK;
-       desc->subtype.sink_subtype = CORESIGHT_DEV_SUBTYPE_SINK_PORT;
-       desc->ops = &tpiu_cs_ops;
-       desc->pdata = pdata;
-       desc->dev = dev;
-       drvdata->csdev = coresight_register(desc);
+       desc.type = CORESIGHT_DEV_TYPE_SINK;
+       desc.subtype.sink_subtype = CORESIGHT_DEV_SUBTYPE_SINK_PORT;
+       desc.ops = &tpiu_cs_ops;
+       desc.pdata = pdata;
+       desc.dev = dev;
+       drvdata->csdev = coresight_register(&desc);
        if (IS_ERR(drvdata->csdev))
                return PTR_ERR(drvdata->csdev);
 
This page took 0.027852 seconds and 5 git commands to generate.