linux/drivers/staging/android
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
..
ion staging: android: ion: fix wrong init of dma_buf_export_info 2015-04-21 14:47:16 +05:30
trace android: convert sync to fence api, v6 2014-07-08 13:28:26 -07:00
uapi staging: Remove the Android alarm-dev driver 2015-01-25 20:10:10 +08:00
ashmem.c ashmem: use __vfs_read() 2015-04-11 22:29:38 -04:00
ashmem.h
Kconfig staging: Remove the Android logger driver 2015-01-28 11:31:26 -08:00
lowmemorykiller.c oom: add helpers for setting and clearing TIF_MEMDIE 2015-02-11 17:06:03 -08:00
Makefile staging: Remove logger and alarm-dev from android Makefile 2015-01-28 11:32:39 -08:00
sw_sync.c staging: android: sw_sync: checkpatch fixes 2014-09-19 16:35:53 -07:00
sw_sync.h staging: android: sw_sync: checkpatch fixes 2014-09-19 16:35:53 -07:00
sync_debug.c Staging: android: fix line length coding style issue in sync_debug.c 2015-01-17 16:17:11 -08:00
sync.c staging: android: sync: Fix memory corruption in sync_timeline_signal(). 2015-03-26 10:58:51 +01:00
sync.h staging : android : sync : get_unused_fd 2014-09-28 22:03:57 -04:00
timed_gpio.c Staging patches for 3.19-rc1 2014-12-15 18:06:13 -08:00
timed_gpio.h
timed_output.c Staging: android: timed_output.c: use kstrtoint() instead of sscanf() 2014-07-30 17:17:02 -07:00
timed_output.h
TODO staging: android: logger: Add a TODO 2014-11-03 16:09:28 -08:00