alistair23-linux/drivers/staging/android/ion
Sumit Semwal 72449cb47b staging: android: ion: fix wrong init of dma_buf_export_info
Fixes: 817bd7253291 ("dma-buf: cleanup dma_buf_export() to make it
easily extensible")

Stupid copy-paste from me in the above patch leads to the following static
checker warning:

        drivers/staging/android/ion/ion.c:1112 ion_share_dma_buf()
        error: potentially dereferencing uninitialized 'buffer'.

drivers/staging/android/ion/ion.c
  1103  struct dma_buf *ion_share_dma_buf(struct ion_client *client,
  1104                                                  struct
ion_handle *handle)
  1105  {
  1106          struct ion_buffer *buffer;
                                   ^^^^^^
  1107          struct dma_buf *dmabuf;
  1108          bool valid_handle;
  1109          DEFINE_DMA_BUF_EXPORT_INFO(exp_info);
  1110
  1111          exp_info.ops = &dma_buf_ops;
  1112          exp_info.size = buffer->size;
                                ^^^^^^
  1113          exp_info.flags = O_RDWR;
  1114          exp_info.priv = buffer;
                                ^^^^^^
And here also.

  1115

This patch corrects this stupidity.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
2015-04-21 14:47:16 +05:30
..
tegra staging: android: ion: Deletion of unnecessary checks before two function calls 2014-11-26 13:42:53 -08:00
compat_ion.c android: ->f_op is never NULL 2014-10-09 02:39:12 -04:00
compat_ion.h ion: add compat_ioctl 2013-12-14 08:57:18 -08:00
ion.c staging: android: ion: fix wrong init of dma_buf_export_info 2015-04-21 14:47:16 +05:30
ion.h Staging: android: ion: fix typos in comments 2014-11-03 16:22:50 -08:00
ion_carveout_heap.c staging: android: ion: Remove redundant return of void function 2014-08-16 12:23:23 -07:00
ion_chunk_heap.c staging: android: ion: Remove redundant return of void function 2014-08-16 12:23:23 -07:00
ion_cma_heap.c staging: ion: ion_cma_heap: remove ion_cma_get_sgtable 2015-01-17 16:14:16 -08:00
ion_dummy_driver.c staging: android: ion: Deletion of unnecessary checks before two function calls 2014-11-26 13:42:53 -08:00
ion_heap.c staging: ion: always initialize the free list parameters 2015-01-17 16:16:00 -08:00
ion_page_pool.c staging: android: Assign bool to true 2014-10-23 12:38:32 +08:00
ion_priv.h Staging: android: ion: fix typos in comments 2014-11-03 16:22:50 -08:00
ion_system_heap.c staging: android: ion: Remove redundant return of void function 2014-08-16 12:23:23 -07:00
ion_test.c staging: android: ion_test: Add the MODULE_LICENSE macro 2015-04-03 15:13:52 +02:00
Kconfig staging: ion: vm_insert_pfn and zap_page_range rely on CONFIG_MMU 2014-07-30 16:36:27 -07:00
Makefile ion: Add dummy driver for testing 2014-01-09 21:16:40 -08:00