.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Qualcomm Technologies HIDMA DMA engine Management interface |
---|
3 | 4 | * |
---|
4 | 5 | * 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. |
---|
14 | 6 | */ |
---|
15 | 7 | |
---|
16 | 8 | #include <linux/dmaengine.h> |
---|
.. | .. |
---|
191 | 183 | |
---|
192 | 184 | irq = platform_get_irq(pdev, 0); |
---|
193 | 185 | if (irq < 0) { |
---|
194 | | - dev_err(&pdev->dev, "irq resources not found\n"); |
---|
195 | 186 | rc = irq; |
---|
196 | 187 | goto out; |
---|
197 | 188 | } |
---|
.. | .. |
---|
396 | 387 | ret = PTR_ERR(new_pdev); |
---|
397 | 388 | goto out; |
---|
398 | 389 | } |
---|
399 | | - of_node_get(child); |
---|
400 | 390 | new_pdev->dev.of_node = child; |
---|
401 | 391 | of_dma_configure(&new_pdev->dev, child, true); |
---|
402 | 392 | /* |
---|
.. | .. |
---|
404 | 394 | * platforms with or without MSI support. |
---|
405 | 395 | */ |
---|
406 | 396 | of_msi_configure(&new_pdev->dev, child); |
---|
407 | | - of_node_put(child); |
---|
408 | 397 | } |
---|
| 398 | + |
---|
| 399 | + kfree(res); |
---|
| 400 | + |
---|
| 401 | + return ret; |
---|
| 402 | + |
---|
409 | 403 | out: |
---|
| 404 | + of_node_put(child); |
---|
410 | 405 | kfree(res); |
---|
411 | 406 | |
---|
412 | 407 | return ret; |
---|