aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2012-05-10 02:32:00 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-20 08:03:02 -0400
commit1259762facdcf31ea362997d9682ccc3d93d7346 (patch)
tree7e548420ef699fd3363c62fa91329175b9dd4a34 /drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c
parente6364a987413b9e5413b48e9d31ecdd2b02bb28b (diff)
[media] s5p-mfc: Fix NULL pointer warnings
Fixes the following type of warnings detected by sparse: warning: Using plain integer as NULL pointer. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c')
-rw-r--r--drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c b/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c
index f2481a85e0a2..08a5cfeaa59e 100644
--- a/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c
+++ b/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c
@@ -52,7 +52,7 @@ int s5p_mfc_alloc_and_load_firmware(struct s5p_mfc_dev *dev)
52 s5p_mfc_bitproc_buf = vb2_dma_contig_memops.alloc( 52 s5p_mfc_bitproc_buf = vb2_dma_contig_memops.alloc(
53 dev->alloc_ctx[MFC_BANK1_ALLOC_CTX], dev->fw_size); 53 dev->alloc_ctx[MFC_BANK1_ALLOC_CTX], dev->fw_size);
54 if (IS_ERR(s5p_mfc_bitproc_buf)) { 54 if (IS_ERR(s5p_mfc_bitproc_buf)) {
55 s5p_mfc_bitproc_buf = 0; 55 s5p_mfc_bitproc_buf = NULL;
56 mfc_err("Allocating bitprocessor buffer failed\n"); 56 mfc_err("Allocating bitprocessor buffer failed\n");
57 release_firmware(fw_blob); 57 release_firmware(fw_blob);
58 return -ENOMEM; 58 return -ENOMEM;
@@ -63,7 +63,7 @@ int s5p_mfc_alloc_and_load_firmware(struct s5p_mfc_dev *dev)
63 mfc_err("The base memory for bank 1 is not aligned to 128KB\n"); 63 mfc_err("The base memory for bank 1 is not aligned to 128KB\n");
64 vb2_dma_contig_memops.put(s5p_mfc_bitproc_buf); 64 vb2_dma_contig_memops.put(s5p_mfc_bitproc_buf);
65 s5p_mfc_bitproc_phys = 0; 65 s5p_mfc_bitproc_phys = 0;
66 s5p_mfc_bitproc_buf = 0; 66 s5p_mfc_bitproc_buf = NULL;
67 release_firmware(fw_blob); 67 release_firmware(fw_blob);
68 return -EIO; 68 return -EIO;
69 } 69 }
@@ -72,7 +72,7 @@ int s5p_mfc_alloc_and_load_firmware(struct s5p_mfc_dev *dev)
72 mfc_err("Bitprocessor memory remap failed\n"); 72 mfc_err("Bitprocessor memory remap failed\n");
73 vb2_dma_contig_memops.put(s5p_mfc_bitproc_buf); 73 vb2_dma_contig_memops.put(s5p_mfc_bitproc_buf);
74 s5p_mfc_bitproc_phys = 0; 74 s5p_mfc_bitproc_phys = 0;
75 s5p_mfc_bitproc_buf = 0; 75 s5p_mfc_bitproc_buf = NULL;
76 release_firmware(fw_blob); 76 release_firmware(fw_blob);
77 return -EIO; 77 return -EIO;
78 } 78 }
@@ -82,7 +82,7 @@ int s5p_mfc_alloc_and_load_firmware(struct s5p_mfc_dev *dev)
82 if (IS_ERR(b_base)) { 82 if (IS_ERR(b_base)) {
83 vb2_dma_contig_memops.put(s5p_mfc_bitproc_buf); 83 vb2_dma_contig_memops.put(s5p_mfc_bitproc_buf);
84 s5p_mfc_bitproc_phys = 0; 84 s5p_mfc_bitproc_phys = 0;
85 s5p_mfc_bitproc_buf = 0; 85 s5p_mfc_bitproc_buf = NULL;
86 mfc_err("Allocating bank2 base failed\n"); 86 mfc_err("Allocating bank2 base failed\n");
87 release_firmware(fw_blob); 87 release_firmware(fw_blob);
88 return -ENOMEM; 88 return -ENOMEM;
@@ -94,7 +94,7 @@ int s5p_mfc_alloc_and_load_firmware(struct s5p_mfc_dev *dev)
94 mfc_err("The base memory for bank 2 is not aligned to 128KB\n"); 94 mfc_err("The base memory for bank 2 is not aligned to 128KB\n");
95 vb2_dma_contig_memops.put(s5p_mfc_bitproc_buf); 95 vb2_dma_contig_memops.put(s5p_mfc_bitproc_buf);
96 s5p_mfc_bitproc_phys = 0; 96 s5p_mfc_bitproc_phys = 0;
97 s5p_mfc_bitproc_buf = 0; 97 s5p_mfc_bitproc_buf = NULL;
98 release_firmware(fw_blob); 98 release_firmware(fw_blob);
99 return -EIO; 99 return -EIO;
100 } 100 }
@@ -126,7 +126,7 @@ int s5p_mfc_reload_firmware(struct s5p_mfc_dev *dev)
126 release_firmware(fw_blob); 126 release_firmware(fw_blob);
127 return -ENOMEM; 127 return -ENOMEM;
128 } 128 }
129 if (s5p_mfc_bitproc_buf == 0 || s5p_mfc_bitproc_phys == 0) { 129 if (s5p_mfc_bitproc_buf == NULL || s5p_mfc_bitproc_phys == 0) {
130 mfc_err("MFC firmware is not allocated or was not mapped correctly\n"); 130 mfc_err("MFC firmware is not allocated or was not mapped correctly\n");
131 release_firmware(fw_blob); 131 release_firmware(fw_blob);
132 return -EINVAL; 132 return -EINVAL;
@@ -146,9 +146,9 @@ int s5p_mfc_release_firmware(struct s5p_mfc_dev *dev)
146 if (!s5p_mfc_bitproc_buf) 146 if (!s5p_mfc_bitproc_buf)
147 return -EINVAL; 147 return -EINVAL;
148 vb2_dma_contig_memops.put(s5p_mfc_bitproc_buf); 148 vb2_dma_contig_memops.put(s5p_mfc_bitproc_buf);
149 s5p_mfc_bitproc_virt = 0; 149 s5p_mfc_bitproc_virt = NULL;
150 s5p_mfc_bitproc_phys = 0; 150 s5p_mfc_bitproc_phys = 0;
151 s5p_mfc_bitproc_buf = 0; 151 s5p_mfc_bitproc_buf = NULL;
152 return 0; 152 return 0;
153} 153}
154 154