summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0004-gstimxcommon-Return-0-instead-of-NULL-for-a-function.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-multimedia/gstreamer/imx-gst1.0-plugin/0004-gstimxcommon-Return-0-instead-of-NULL-for-a-function.patch')
-rw-r--r--recipes-multimedia/gstreamer/imx-gst1.0-plugin/0004-gstimxcommon-Return-0-instead-of-NULL-for-a-function.patch87
1 files changed, 87 insertions, 0 deletions
diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0004-gstimxcommon-Return-0-instead-of-NULL-for-a-function.patch b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0004-gstimxcommon-Return-0-instead-of-NULL-for-a-function.patch
new file mode 100644
index 00000000..292ab63f
--- /dev/null
+++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0004-gstimxcommon-Return-0-instead-of-NULL-for-a-function.patch
@@ -0,0 +1,87 @@
1From 141f8f692ae2c7e6d41a2d78113c806602122ad5 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 12 Mar 2023 19:51:27 -0700
4Subject: [PATCH 04/10] gstimxcommon: Return 0 instead of NULL for a functions
5 returning unsigned long
6
7Fixes
8gstimxcommon.c:113:10: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'unsigned long' [-Wint-conversion]
9 return NULL;
10
11Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 libs/gstimxcommon.c | 18 +++++++++---------
15 1 file changed, 9 insertions(+), 9 deletions(-)
16
17diff --git a/libs/gstimxcommon.c b/libs/gstimxcommon.c
18index 27fd913..803c6e5 100644
19--- a/libs/gstimxcommon.c
20+++ b/libs/gstimxcommon.c
21@@ -35,13 +35,13 @@ unsigned long phy_addr_from_fd(int dmafd)
22 int ret, fd;
23
24 if (dmafd < 0)
25- return NULL;
26+ return 0;
27
28 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
29 #ifdef USE_ION
30 fd = open(dev_ion, O_RDWR);
31 if(fd < 0) {
32- return NULL;
33+ return 0;
34 }
35
36 struct ion_phys_dma_data data = {
37@@ -58,18 +58,18 @@ unsigned long phy_addr_from_fd(int dmafd)
38 ret = ioctl(fd, ION_IOC_CUSTOM, &custom);
39 close(fd);
40 if (ret < 0)
41- return NULL;
42+ return 0;
43
44 return data.phys;
45 #else
46- return NULL;
47+ return 0;
48 #endif /* USE_ION */
49 #else
50 struct dma_buf_phys dma_phys;
51
52 ret = ioctl(dmafd, DMA_BUF_IOCTL_PHYS, &dma_phys);
53 if (ret < 0)
54- return NULL;
55+ return 0;
56
57 return dma_phys.phys;
58 #endif
59@@ -86,7 +86,7 @@ unsigned long phy_addr_from_vaddr(void *vaddr, int size)
60 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
61 fd = open(dev_ion, O_RDWR);
62 if(fd < 0) {
63- return NULL;
64+ return 0;
65 }
66
67 struct ion_phys_virt_data data = {
68@@ -103,13 +103,13 @@ unsigned long phy_addr_from_vaddr(void *vaddr, int size)
69 ret = ioctl(fd, ION_IOC_CUSTOM, &custom);
70 close(fd);
71 if (ret < 0)
72- return NULL;
73+ return 0;
74
75 return data.phys;
76 #else
77- return NULL;
78+ return 0;
79 #endif
80 #else
81- return NULL;
82+ return 0;
83 #endif
84 }
85--
862.39.2
87