[PATCH 5/6] media: staging: atomisp: Fix potential NULL pointer dereference

2018-05-22 Thread Pankaj Bharadiya
In sh_css_config_input_network(), "stream" is being dereferenced before it is null checked. Fix it by moving the "stream" pointer dereference after it has been properly null checked. Signed-off-by: Pankaj Bharadiya --- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_c

[PATCH 2/6] media: staging: atomisp: Remove useless if statement

2018-05-22 Thread Pankaj Bharadiya
Local variable "requeue" is assigned only once to a constant "false" value so "if(requeue)" condition will never be true. Thus remove it. Signed-off-by: Pankaj Bharadiya --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 14 -- 1 file change

[PATCH 3/6] media: staging: atomisp: Remove useless "ifndef ISP2401"

2018-05-22 Thread Pankaj Bharadiya
In atomisp_csi2_set_ffmt(), there is no reason to have "#ifndef ISP2401" condition since code is identical in ifndef and else sections. Hence remove redudent checks. Signed-off-by: Pankaj Bharadiya --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_csi2.c | 8 1 file

[PATCH 4/6] media: staging: atomisp: Fix potential NULL pointer dereference

2018-05-22 Thread Pankaj Bharadiya
In ia_css_pipe_get_primary_binarydesc(), "pipe" is being dereferenced before it is null checked. Fix it by moving the "pipe" pointer dereference after it has been properly null checked. Signed-off-by: Pankaj Bharadiya --- .../atomisp/pci/atomisp2/css2400/camera/pipe/s

[PATCH 1/6] media: staging: atomisp: remove redundent check

2018-05-22 Thread Pankaj Bharadiya
Assignment asd = &isp->asd[i] can never be null hence remove redundent check. Signed-off-by: Pankaj Bharadiya --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/a

[PATCH 6/6] media: staging: atomisp: Fix potential NULL pointer dereference

2018-05-22 Thread Pankaj Bharadiya
In verify_copy_out_frame_format(), "pipe" is being dereferenced before it is null checked. Fix it by moving the "pipe" pointer dereference after it has been properly null checked. Signed-off-by: Pankaj Bharadiya --- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_cs

[PATCH 0/6] Fix issues reported by static analysis tool.

2018-05-22 Thread Pankaj Bharadiya
This patch series fixes some of the issues reported by static analysis tool. Pankaj Bharadiya (6): media: staging: atomisp: remove redundent check media: staging: atomisp: Remove useless if statement media: staging: atomisp: Remove useless "ifndef ISP2401" media: staging: at

Re: [PATCH] staging: dgnc: Replace CamelCase namings with underscores.

2016-10-17 Thread Pankaj Bharadiya
On Mon, Oct 17, 2016 at 1:16 PM, Greg KH wrote: > > On Mon, Oct 17, 2016 at 01:13:55AM +0530, Pankaj Bharadiya wrote: > > Replace CamelCase names with underscores to comply with the standard > > kernel coding style. > > > > Signed-off-by: Pankaj Bharadiya >

[PATCH v2 1/2] staging: dgnc: Remove some redundant functions

2016-10-17 Thread Pankaj Bharadiya
dgnc_tty_preinit() and dgnc_tty_post_uninit() functions are used to allocate and free "dgnc_TmpWriteBuf" and this "dgnc_TmpWriteBuf" is not really getting used. Hence remove these redundant functions. Also remove dgnc_TmpWriteBuf variable as it is not used anymore. S

[PATCH v2 0/2] staging: dgnc: Code cleaup

2016-10-17 Thread Pankaj Bharadiya
Hi, This patchset does minor cleanup for dgnc driver. v1->v2: - Split into multiple patches - remove redundant dgnc_tmp_write_buf variable and function calls - rename dgnc_default_termios to default_termios Pankaj Bharadiya (2): staging: dgnc: Remove some redundant functions staging: d

[PATCH v2 2/2] staging: dgnc: Replace CamelCase namings with underscores

2016-10-17 Thread Pankaj Bharadiya
Replace CamelCase names with underscores to comply with the standard kernel coding style. Signed-off-by: Pankaj Bharadiya --- drivers/staging/dgnc/dgnc_tty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc

[PATCH] staging: greybus: audio: remove redundant slot field

2016-10-17 Thread Pankaj Bharadiya
gb_audio_manager_module_descriptor's intf_id field maintains the information about the interface on which module is connected hence having an extra slot field is redundant. Thus remove the slot field and its associated code. Signed-off-by: Pankaj Bharadiya --- drivers/staging/gr

[PATCH] staging: dgnc: Replace CamelCase namings with underscores.

2016-10-16 Thread Pankaj Bharadiya
Replace CamelCase names with underscores to comply with the standard kernel coding style. Signed-off-by: Pankaj Bharadiya --- drivers/staging/dgnc/dgnc_tty.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers

[PATCH] staging: greybus: audio: Rename cport with intf_id

2016-10-16 Thread Pankaj Bharadiya
gb_audio_manager_module_descriptor's cport field is actually used to manage and pass interface id to user space. Thus rename gb_audio_manager_module_descriptor's 'cport' field and few other things to avoid confusion. Signed-off-by: Pankaj Bharadiya --- drivers/staging/gre