hc
2024-02-20 e636c8d336489bf3eed5878299e6cc045bbad077
kernel/drivers/media/platform/davinci/vpif.c
....@@ -1,11 +1,11 @@
11 /*
22 * vpif - Video Port Interface driver
33 * VPIF is a receiver and transmitter for video data. It has two channels(0, 1)
4
- * that receiveing video byte stream and two channels(2, 3) for video output.
4
+ * that receiving video byte stream and two channels(2, 3) for video output.
55 * The hardware supports SDTV, HDTV formats, raw data capture.
66 * Currently, the driver supports NTSC and PAL standards.
77 *
8
- * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
8
+ * Copyright (C) 2009 Texas Instruments Incorporated - https://www.ti.com/
99 *
1010 * This program is free software; you can redistribute it and/or
1111 * modify it under the terms of the GNU General Public License as
....@@ -428,6 +428,7 @@
428428 static struct resource *res, *res_irq;
429429 struct platform_device *pdev_capture, *pdev_display;
430430 struct device_node *endpoint = NULL;
431
+ int ret;
431432
432433 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
433434 vpif_base = devm_ioremap_resource(&pdev->dev, res);
....@@ -458,7 +459,8 @@
458459 res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
459460 if (!res_irq) {
460461 dev_warn(&pdev->dev, "Missing IRQ resource.\n");
461
- return -EINVAL;
462
+ ret = -EINVAL;
463
+ goto err_put_rpm;
462464 }
463465
464466 pdev_capture = devm_kzalloc(&pdev->dev, sizeof(*pdev_capture),
....@@ -492,10 +494,17 @@
492494 }
493495
494496 return 0;
497
+
498
+err_put_rpm:
499
+ pm_runtime_put(&pdev->dev);
500
+ pm_runtime_disable(&pdev->dev);
501
+
502
+ return ret;
495503 }
496504
497505 static int vpif_remove(struct platform_device *pdev)
498506 {
507
+ pm_runtime_put(&pdev->dev);
499508 pm_runtime_disable(&pdev->dev);
500509 return 0;
501510 }