forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/dma/qcom/hidma_mgmt.c
....@@ -1,16 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Qualcomm Technologies HIDMA DMA engine Management interface
34 *
45 * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 and
8
- * only version 2 as published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
146 */
157
168 #include <linux/dmaengine.h>
....@@ -191,7 +183,6 @@
191183
192184 irq = platform_get_irq(pdev, 0);
193185 if (irq < 0) {
194
- dev_err(&pdev->dev, "irq resources not found\n");
195186 rc = irq;
196187 goto out;
197188 }
....@@ -396,7 +387,6 @@
396387 ret = PTR_ERR(new_pdev);
397388 goto out;
398389 }
399
- of_node_get(child);
400390 new_pdev->dev.of_node = child;
401391 of_dma_configure(&new_pdev->dev, child, true);
402392 /*
....@@ -404,9 +394,14 @@
404394 * platforms with or without MSI support.
405395 */
406396 of_msi_configure(&new_pdev->dev, child);
407
- of_node_put(child);
408397 }
398
+
399
+ kfree(res);
400
+
401
+ return ret;
402
+
409403 out:
404
+ of_node_put(child);
410405 kfree(res);
411406
412407 return ret;