[PATCH] staging: gdm72xx: wm_ioctl.h: fixed a macro coding style

2012-11-02 Thread Kumar Amit Mehta
fix for macro coding style. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/gdm72xx/wm_ioctl.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gdm72xx/wm_ioctl.h b/drivers/staging/gdm72xx/wm_ioctl.h index 9f46e06..4ceecc4 100644

[PATCH] staging: iio: adc: ad7280a.c: fixed macro coding style

2012-11-02 Thread Kumar Amit Mehta
remove unnecessary semicolon from the macro definition Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/iio/adc/ad7280a.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c index

Re: [PATCH] staging: gdm72xx: wm_ioctl.h: fixed a macro coding style

2012-11-02 Thread Kumar amit mehta
On Fri, Nov 02, 2012 at 09:55:55AM +0300, Dan Carpenter wrote: On Thu, Nov 01, 2012 at 11:42:59PM -0700, Kumar Amit Mehta wrote: fix for macro coding style. No. The parenthesis are not needed. I assume this is a checkpatch.pl warning? regards, dan carpenter Running checkpatch.pl

[PATCH] staging: wlan-ng: hfa384x_usb.c: fixed a coding style issue

2012-11-02 Thread Kumar Amit Mehta
checkpatch.pl throws error message for the current code. This patch fixes coding style issue. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/wlan-ng/hfa384x_usb.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wlan-ng

[PATCH] drivers: ethernet: qlogic: qlge_dbg.c: Fixed a coding style issue

2012-11-04 Thread Kumar Amit Mehta
checkpatch.pl throws error message for the current code. This patch fixes this coding style issue. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/net/ethernet/qlogic/qlge/qlge_dbg.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers

[PATCH] drivers: ethernet: qlogic: netxen_nic_ethtool.c: Fixed a coding style issue

2012-11-04 Thread Kumar Amit Mehta
Fixed some coding style issues. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- .../ethernet/qlogic/netxen/netxen_nic_ethtool.c| 86 ++-- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c b

[PATCH] staging: tidspbridge: dynload: dload_internal.h: fix for coding style issue

2012-11-06 Thread Kumar Amit Mehta
fixed few error messages as reported by checkpatch.pl Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- .../staging/tidspbridge/dynload/dload_internal.h |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/tidspbridge/dynload/dload_internal.h b

[PATCH] staging: tidspbridge: dynload: reloc.c: checkpatch.pl cleanup

2012-11-06 Thread Kumar Amit Mehta
fix for few error messages as reported by checkpatch.pl Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/tidspbridge/dynload/reloc.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/tidspbridge/dynload/reloc.c b/drivers/staging

[PATCH] staging: comedi: drivers: jr3_pci.c: fix for coding style issue

2012-11-07 Thread Kumar Amit Mehta
fixed few error and warning messages as reported by checkpatch.pl Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/comedi/drivers/jr3_pci.c |9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers

[PATCH] staging: dgrp: dgrp_tty.c: return an -EFAULT if put_user fails

2012-11-13 Thread Kumar Amit Mehta
This fix adds checks for inspecting the return value of put_user() and return -EFAULT on error. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/dgrp/dgrp_tty.c |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/staging/dgrp/dgrp_tty.c

[PATCH] staging: dgrp: dgrp_tty.c: return an -EFAULT if get_user() fails

2012-11-14 Thread Kumar Amit Mehta
Inspect the return value of get_user() and return -EFAULT on error. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/dgrp/dgrp_tty.c |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/staging/dgrp/dgrp_tty.c b/drivers/staging/dgrp

[PATCH] staging: rtl8187se: r8180_core.c: Inspect the return value of register_netdev()

2012-11-14 Thread Kumar Amit Mehta
Inspect the return value of register_netdev() in the driver probe routine and return -ENODEV in case of error. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/rtl8187se/r8180_core.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging

[PATCH v2] staging: dgrp: dgrp_tty.c: return an -EFAULT if put_user fails

2012-11-14 Thread Kumar Amit Mehta
Inspect the return value of put_user() and return -EFAULT on error. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/dgrp/dgrp_tty.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/dgrp/dgrp_tty.c b/drivers/staging/dgrp

[PATCH] staging: comedi: drivers: ni_atmio.c: Add a missing semicolon

2013-03-15 Thread Kumar Amit Mehta
fix a missing end-of-statement by adding a semicolon. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/comedi/drivers/ni_atmio.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/ni_atmio.c b/drivers/staging/comedi

[PATCH] bnx2x: fix assignment of signed expression to unsigned variable

2013-03-23 Thread Kumar Amit Mehta
fix for incorrect assignment of signed expression to unsigned variable. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet

Re: [PATCH] bnx2x: fix assignment of signed expression to unsigned variable

2013-03-23 Thread Kumar amit mehta
On Sat, Mar 23, 2013 at 10:56:47PM +0300, Dan Carpenter wrote: On Sat, Mar 23, 2013 at 11:52:55AM -0700, Kumar Amit Mehta wrote: fix for incorrect assignment of signed expression to unsigned variable. This fix isn't right. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com

[PATCH v2] bnx2x: fix assignment of signed expression to unsigned variable

2013-03-24 Thread Kumar Amit Mehta
fix for incorrect assignment of signed expression to unsigned variable. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/broadcom

[PATCH] staging: vme: fix for a potential NULL pointer dereference

2013-03-24 Thread Kumar Amit Mehta
Audit the return value of cdev_alloc and hence fixes a potential NULL pointer dereferencing. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/vme/devices/vme_user.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/staging/vme/devices/vme_user.c b

[PATCH] staging: wlan-ng: hfa384x.h: fix for error reported by smatch

2013-02-16 Thread Kumar Amit Mehta
Add the missing header include for 'struct urb' datatypes to avoid potential build issues. Found using smatch. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/wlan-ng/hfa384x.h |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/wlan-ng/hfa384x.h b

[PATCH] ethernet: neterion: vxge: vxge-traffic.c: fix for a potential NULL pointer dereference

2013-02-16 Thread Kumar Amit Mehta
fix for a potential NULL pointer dereference and removal of a redundant assignment operation. Found using smatch. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/net/ethernet/neterion/vxge/vxge-traffic.c |8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff

[PATCH] staging: comedi: drivers: addi-data: hwdrv_apci3200.c: Add a missing semicolon

2013-02-16 Thread Kumar Amit Mehta
fix for missing end-of-statement by adding a semicolon Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- .../comedi/drivers/addi-data/hwdrv_apci3200.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c b

[PATCH] net: wireless: orinoco: orinoco_usb.c: fix DMA buffers on stack

2013-02-18 Thread Kumar Amit Mehta
This patch fixes an instance of DMA buffer on stack(being passed to usb_control_msg) for the wireless USB version of the Agere Orinoco card driver. It also fixes the missing audit for the return value of firmware download routine. Found using smatch. Signed-off-by: Kumar Amit Mehta gmate.a

[PATCH] net: wireless: hostap: hostap_ap.c: Return -ENOMEM instead of -1 for if kmalloc() fails.

2013-02-18 Thread Kumar Amit Mehta
When memory allocation using, kmalloc() fails, report appropriate error value. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/net/wireless/hostap/hostap_ap.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/hostap/hostap_ap.c b

[PATCH] staging: comedi: drivers: usbduxsigma.c: fix DMA buffers on stack

2013-02-21 Thread Kumar Amit Mehta
This patch fixes an instance of DMA buffer on stack(being passed to usb_control_msg)for the USB-DUXsigma Board driver. Found using smatch. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/comedi/drivers/usbduxsigma.c | 37 +- 1 file changed, 24

[PATCH v2] staging: comedi: drivers: usbduxsigma.c: fix DMA buffers on stack

2013-02-21 Thread Kumar Amit Mehta
This patch fixes an instance of DMA buffer on stack(being passed to usb_control_msg)for the USB-DUXsigma Board driver. Found using smatch. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/comedi/drivers/usbduxsigma.c | 27 -- 1 file changed, 17

Re: [PATCH v2] staging: comedi: drivers: usbduxsigma.c: fix DMA buffers on stack

2013-02-22 Thread Kumar amit mehta
On Fri, Feb 22, 2013 at 10:02:44AM +, Ian Abbott wrote: On 2013-02-22 06:07, Kumar Amit Mehta wrote: This patch fixes an instance of DMA buffer on stack(being passed to usb_control_msg)for the USB-DUXsigma Board driver. Found using smatch. Looks good here too. Reviewed-by: Ian

[PATCH 0/2] [comedi] fix for DMA buffers on stack

2013-02-22 Thread Kumar Amit Mehta
This patch series fixes couple of instances of DMA buffers on stack(being passed to usb_control_msg) for comedi USB drivers. Found using smatch. Kumar Amit Mehta (2): staging: comedi: drivers: usbdux.c: fix DMA buffers on stack staging: comedi: drivers: usbduxfast.c: fix for DMA buffers

[PATCH 1/2] staging: comedi: drivers: usbdux.c: fix DMA buffers on stack

2013-02-22 Thread Kumar Amit Mehta
fix for instances of DMA buffer on stack(being passed to usb_control_msg) for the USB-DUX-D Board driver. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/comedi/drivers/usbdux.c | 31 +++ 1 file changed, 19 insertions(+), 12 deletions

[PATCH 2/2] staging: comedi: drivers: usbduxfast.c: fix for DMA buffers on stack

2013-02-22 Thread Kumar Amit Mehta
fix for instances of DMA buffer on stack(being passed to usb_control_msg) for the USB-DUXfast Board driver. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/comedi/drivers/usbduxfast.c | 30 --- 1 file changed, 18 insertions(+), 12 deletions

[PATCH 0/2] staging/dgrp/dgrp_tty.c: audit function return values

2012-11-22 Thread Kumar Amit Mehta
This patch series fixes two issues in dgrp driver: i) Removes the TIOCSSOFTCAR ioctl handler from dgrp driver so as to allow the core tty layer to take care of this ioctl instead. ii) Audits the return value of get_user() and put_user() and return -EFAULT in case of error. -- 1.7.9.5 -- To

[PATCH 2/2] staging: dgrp: dgrp_tty.c: Audit the return values of get/put_user()

2012-11-22 Thread Kumar Amit Mehta
fix for missing audits for return values of get_user() and put_user(). Inspecting the return values of get/put_user() would make the access_ok() redundant, hence removing calls to access_ok() in such scenarios. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/dgrp

[PATCH 1/2] staging: dgrp: dgrp_tty.c: Remove the TIOCSSOFTCAR ioctl handler from dgrp driver

2012-11-22 Thread Kumar Amit Mehta
Remove the TIOCSSOFTCAR ioctl handler from dgrp driver and let the core tty layer to take care of this ioctl instead. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/dgrp/dgrp_tty.c |7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/dgrp

[PATCH v3] staging: dgrp: dgrp_tty.c: return an -EFAULT if put_user() fails

2012-11-15 Thread Kumar Amit Mehta
Inspect the return value of put_user() and return -EFAULT on error. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/dgrp/dgrp_tty.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/staging/dgrp/dgrp_tty.c b/drivers/staging/dgrp

[PATCH] staging: rtl8192e: rtl8192e: rtl_core.c: Audit the return value of register_netdev()

2012-11-15 Thread Kumar Amit Mehta
Inspect the return value of register_netdev() in the driver probe routine and return -ENODEV in case of error. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers

[PATCH] staging: dgrp: dgrp_tty.c: Audit the return values of get/put_user()

2012-11-19 Thread Kumar Amit Mehta
-- fix for missing audits for return values of get_user() and put_user(). -- Remove the TIOCSSOFTCAR ioctl handling from dgrp driver. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/dgrp/dgrp_tty.c | 25 ++--- 1 file changed, 10 insertions(+), 15

[PATCH] staging: dgrp: dgrp_tty.c: Remove the TIOCSSOFTCAR ioctl handler from dgrp driver

2012-11-19 Thread Kumar Amit Mehta
Remove the TIOCSSOFTCAR ioctl handler from dgrp driver to allow the core tty layer to take care of this ioctl instead. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/dgrp/dgrp_tty.c |7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/dgrp

Re: [PATCH] staging: dgrp: dgrp_tty.c: Audit the return values of get/put_user()

2012-11-19 Thread Kumar amit mehta
On Mon, Nov 19, 2012 at 02:15:54PM +0300, Dan Carpenter wrote: On Mon, Nov 19, 2012 at 04:25:31PM +0530, Kumar Amit Mehta wrote: -- fix for missing audits for return values of get_user() and put_user(). -- Remove the TIOCSSOFTCAR ioctl handling from dgrp driver. These should be done

[PATCH] staging: comedi: drivers: fix for a potential NULL pointer dereference

2014-02-25 Thread Kumar Amit Mehta
Return -ENOMEM in ni_E_init if ni_gpct_device_construct returns NULL Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/comedi/drivers/ni_mio_common.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging

[PATCH] staging: sb105x: b_pci_mp.c: fix for non-member access

2014-02-27 Thread Kumar Amit Mehta
'struct tty_struct’ has no member named ‘low_latency’ Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/sb105x/sb_pci_mp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/sb105x/sb_pci_mp.c b/drivers/staging/sb105x/sb_pci_mp.c index

Re: [PATCH] md: bcache: io.c: fix a potential NULL pointer dereference

2013-05-28 Thread Kumar amit mehta
On Tue, May 28, 2013 at 05:20:41PM -0700, Kent Overstreet wrote: On Tue, May 28, 2013 at 12:31:15AM -0700, Kumar Amit Mehta wrote: bio_alloc_bioset returns NULL on failure. This fix adds a missing check for potential NULL pointer dereferencing. Whoops, that's definitely a bug. Thanks

[PATCH] md: bcache: io.c: fix a potential NULL pointer dereference

2013-05-28 Thread Kumar Amit Mehta
bio_alloc_bioset returns NULL on failure. This fix adds a missing check for potential NULL pointer dereferencing. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/md/bcache/io.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/md/bcache/io.c b/drivers/md/bcache

[PATCH] md: md.c: use strlcpy instead of strcpy

2013-05-28 Thread Kumar Amit Mehta
Name of major driver can be of maximum of DISK_NAME_LEN size, therefore use strlcpy instead of strcpy. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/md/md.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/md.c b/drivers/md/md.c index 0bbe710

[PATCH] staging: comedi: drivers: pcl812.c: fixed a coding style issue

2014-04-04 Thread Kumar Amit Mehta
Fixed a coding style issue. Reported by checkpatch.pl Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/comedi/drivers/pcl812.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/pcl812.c b/drivers/staging/comedi/drivers

Re: [PATCH] staging: comedi: drivers: pcl812.c: fixed a coding style issue

2014-04-04 Thread Kumar Amit Mehta
On Fri, Apr 04, 2014 at 02:07:07PM +0300, Dan Carpenter wrote: On Fri, Apr 04, 2014 at 01:05:29PM +0300, Kumar Amit Mehta wrote: Fixed a coding style issue. Reported by checkpatch.pl It's better if the commit messages are more specific than this. So, should I resend the patch with a more

Re: [PATCH] staging: comedi: drivers: pcl812.c: fixed a coding style issue

2014-04-04 Thread Kumar Amit Mehta
On Fri, Apr 04, 2014 at 04:26:51PM +0300, Dan Carpenter wrote: On Fri, Apr 04, 2014 at 02:48:52PM +0300, Kumar Amit Mehta wrote: On Fri, Apr 04, 2014 at 02:07:07PM +0300, Dan Carpenter wrote: On Fri, Apr 04, 2014 at 01:05:29PM +0300, Kumar Amit Mehta wrote: Fixed a coding style issue

[PATCH v2] staging: comedi: drivers: pcl812.c: add curly braces for checkpatch

2014-04-04 Thread Kumar Amit Mehta
Kernel style is that if one side of the if else statement gets has curly braces then both side should have them. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/comedi/drivers/pcl812.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging

[PATCH] staging: lustre: lustre: mdc: lproc_mdc.c: Fix for potential NULL pointer dereference

2015-01-26 Thread Kumar Amit Mehta
In mdc_kuc_write(), OBD_ALLOC(lh, len) may leave 'lh' to NULL as kmalloc may fail to allocate memory. This fix adds a check to avoid, dereferencing a NULL pointer. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/lustre/lustre/mdc/lproc_mdc.c | 2 ++ 1 file changed, 2

[PATCH] staging: rtl8188eu: core: rtw_wlan_util.c: Fix for NULL dereference

2015-01-26 Thread Kumar Amit Mehta
In rtw_check_bcn_info(), check the return value of kzalloc() before dereferencing it, to avoid NULL pointer dereference. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging

[PATCH] drivers: gpu: drm: i915: intel_fifo_underrun.c: Fix a typo in comment

2015-01-26 Thread Kumar Amit Mehta
The comment for intel_cpu_fifo_underrun_irq_handler() is not consistent with the code and the rest of the comment for this routine. This patch fixes this typo in comment. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/gpu/drm/i915/intel_fifo_underrun.c | 2 +- 1 file changed, 1

[PATCH] staging: lustre: lustre: obdclass: obd_mount.c: Fix NULL dereference

2015-01-26 Thread Kumar Amit Mehta
OBD_ALLOC_PTR(uuid) invokes kmalloc, which may return NULL. This fix adds a check before dereferencing such pointer. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers

[PATCH] bnx2x: fix assignment of signed expression to unsigned variable

2013-03-23 Thread Kumar Amit Mehta
fix for incorrect assignment of signed expression to unsigned variable. Signed-off-by: Kumar Amit Mehta --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnx2x

Re: [PATCH] bnx2x: fix assignment of signed expression to unsigned variable

2013-03-23 Thread Kumar amit mehta
On Sat, Mar 23, 2013 at 10:56:47PM +0300, Dan Carpenter wrote: > On Sat, Mar 23, 2013 at 11:52:55AM -0700, Kumar Amit Mehta wrote: > > fix for incorrect assignment of signed expression to unsigned variable. > > > > This fix isn't right. > > > S

[PATCH v2] bnx2x: fix assignment of signed expression to unsigned variable

2013-03-24 Thread Kumar Amit Mehta
fix for incorrect assignment of signed expression to unsigned variable. Signed-off-by: Kumar Amit Mehta --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c b

[PATCH] staging: vme: fix for a potential NULL pointer dereference

2013-03-24 Thread Kumar Amit Mehta
Audit the return value of cdev_alloc and hence fixes a potential NULL pointer dereferencing. Signed-off-by: Kumar Amit Mehta --- drivers/staging/vme/devices/vme_user.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme

[PATCH] staging: comedi: drivers: fix for a potential NULL pointer dereference

2014-02-25 Thread Kumar Amit Mehta
Return -ENOMEM in ni_E_init if ni_gpct_device_construct returns NULL Signed-off-by: Kumar Amit Mehta --- drivers/staging/comedi/drivers/ni_mio_common.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers

[PATCH] staging: sb105x: b_pci_mp.c: fix for non-member access

2014-02-27 Thread Kumar Amit Mehta
'struct tty_struct’ has no member named ‘low_latency’ Signed-off-by: Kumar Amit Mehta --- drivers/staging/sb105x/sb_pci_mp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/sb105x/sb_pci_mp.c b/drivers/staging/sb105x/sb_pci_mp.c index c9d6ee3..5687d6c

[PATCH] md: bcache: io.c: fix a potential NULL pointer dereference

2013-05-28 Thread Kumar Amit Mehta
bio_alloc_bioset returns NULL on failure. This fix adds a missing check for potential NULL pointer dereferencing. Signed-off-by: Kumar Amit Mehta --- drivers/md/bcache/io.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/md/bcache/io.c b/drivers/md/bcache/io.c index 29f344b

[PATCH] md: md.c: use strlcpy instead of strcpy

2013-05-28 Thread Kumar Amit Mehta
Name of major driver can be of maximum of DISK_NAME_LEN size, therefore use strlcpy instead of strcpy. Signed-off-by: Kumar Amit Mehta --- drivers/md/md.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/md.c b/drivers/md/md.c index 0bbe710..9450a2c 100644

Re: [PATCH] md: bcache: io.c: fix a potential NULL pointer dereference

2013-05-28 Thread Kumar amit mehta
On Tue, May 28, 2013 at 05:20:41PM -0700, Kent Overstreet wrote: > On Tue, May 28, 2013 at 12:31:15AM -0700, Kumar Amit Mehta wrote: > > bio_alloc_bioset returns NULL on failure. This fix adds a missing check > > for potential NULL pointer dereferencing. > > Whoops, th

[PATCH] staging: comedi: drivers: usbduxsigma.c: fix DMA buffers on stack

2013-02-21 Thread Kumar Amit Mehta
This patch fixes an instance of DMA buffer on stack(being passed to usb_control_msg)for the USB-DUXsigma Board driver. Found using smatch. Signed-off-by: Kumar Amit Mehta --- drivers/staging/comedi/drivers/usbduxsigma.c | 37 +- 1 file changed, 24 insertions(+), 13

[PATCH v2] staging: comedi: drivers: usbduxsigma.c: fix DMA buffers on stack

2013-02-21 Thread Kumar Amit Mehta
This patch fixes an instance of DMA buffer on stack(being passed to usb_control_msg)for the USB-DUXsigma Board driver. Found using smatch. Signed-off-by: Kumar Amit Mehta --- drivers/staging/comedi/drivers/usbduxsigma.c | 27 -- 1 file changed, 17 insertions(+), 10

Re: [PATCH v2] staging: comedi: drivers: usbduxsigma.c: fix DMA buffers on stack

2013-02-22 Thread Kumar amit mehta
On Fri, Feb 22, 2013 at 10:02:44AM +, Ian Abbott wrote: > On 2013-02-22 06:07, Kumar Amit Mehta wrote: > >This patch fixes an instance of DMA buffer on stack(being passed to > >usb_control_msg)for the USB-DUXsigma Board driver. Found using smatch. > > > > Looks g

[PATCH 0/2] [comedi] fix for DMA buffers on stack

2013-02-22 Thread Kumar Amit Mehta
This patch series fixes couple of instances of DMA buffers on stack(being passed to usb_control_msg) for comedi USB drivers. Found using smatch. Kumar Amit Mehta (2): staging: comedi: drivers: usbdux.c: fix DMA buffers on stack staging: comedi: drivers: usbduxfast.c: fix for DMA buffers

[PATCH 1/2] staging: comedi: drivers: usbdux.c: fix DMA buffers on stack

2013-02-22 Thread Kumar Amit Mehta
fix for instances of DMA buffer on stack(being passed to usb_control_msg) for the USB-DUX-D Board driver. Signed-off-by: Kumar Amit Mehta --- drivers/staging/comedi/drivers/usbdux.c | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/drivers

[PATCH 2/2] staging: comedi: drivers: usbduxfast.c: fix for DMA buffers on stack

2013-02-22 Thread Kumar Amit Mehta
fix for instances of DMA buffer on stack(being passed to usb_control_msg) for the USB-DUXfast Board driver. Signed-off-by: Kumar Amit Mehta --- drivers/staging/comedi/drivers/usbduxfast.c | 30 --- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/drivers

[PATCH] staging: comedi: drivers: ni_atmio.c: Add a missing semicolon

2013-03-15 Thread Kumar Amit Mehta
fix a missing end-of-statement by adding a semicolon. Signed-off-by: Kumar Amit Mehta --- drivers/staging/comedi/drivers/ni_atmio.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/ni_atmio.c b/drivers/staging/comedi/drivers/ni_atmio.c index

[PATCH] staging: wlan-ng: hfa384x.h: fix for error reported by smatch

2013-02-16 Thread Kumar Amit Mehta
Add the missing header include for 'struct urb' datatypes to avoid potential build issues. Found using smatch. Signed-off-by: Kumar Amit Mehta --- drivers/staging/wlan-ng/hfa384x.h |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan

[PATCH] ethernet: neterion: vxge: vxge-traffic.c: fix for a potential NULL pointer dereference

2013-02-16 Thread Kumar Amit Mehta
fix for a potential NULL pointer dereference and removal of a redundant assignment operation. Found using smatch. Signed-off-by: Kumar Amit Mehta --- drivers/net/ethernet/neterion/vxge/vxge-traffic.c |8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/net

[PATCH] staging: comedi: drivers: addi-data: hwdrv_apci3200.c: Add a missing semicolon

2013-02-16 Thread Kumar Amit Mehta
fix for missing end-of-statement by adding a semicolon Signed-off-by: Kumar Amit Mehta --- .../comedi/drivers/addi-data/hwdrv_apci3200.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c b/drivers/staging

[PATCH] net: wireless: orinoco: orinoco_usb.c: fix DMA buffers on stack

2013-02-18 Thread Kumar Amit Mehta
This patch fixes an instance of DMA buffer on stack(being passed to usb_control_msg) for the wireless USB version of the Agere Orinoco card driver. It also fixes the missing audit for the return value of firmware download routine. Found using smatch. Signed-off-by: Kumar Amit Mehta --- drivers

[PATCH] net: wireless: hostap: hostap_ap.c: Return -ENOMEM instead of -1 for if kmalloc() fails.

2013-02-18 Thread Kumar Amit Mehta
When memory allocation using, kmalloc() fails, report appropriate error value. Signed-off-by: Kumar Amit Mehta --- drivers/net/wireless/hostap/hostap_ap.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless

[PATCH] staging: comedi: drivers: pcl812.c: fixed a coding style issue

2014-04-04 Thread Kumar Amit Mehta
Fixed a coding style issue. Reported by checkpatch.pl Signed-off-by: Kumar Amit Mehta --- drivers/staging/comedi/drivers/pcl812.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/pcl812.c b/drivers/staging/comedi/drivers/pcl812.c index

Re: [PATCH] staging: comedi: drivers: pcl812.c: fixed a coding style issue

2014-04-04 Thread Kumar Amit Mehta
On Fri, Apr 04, 2014 at 02:07:07PM +0300, Dan Carpenter wrote: > On Fri, Apr 04, 2014 at 01:05:29PM +0300, Kumar Amit Mehta wrote: > > Fixed a coding style issue. Reported by checkpatch.pl > > > > It's better if the commit messages are more specific than this. So, shou

Re: [PATCH] staging: comedi: drivers: pcl812.c: fixed a coding style issue

2014-04-04 Thread Kumar Amit Mehta
On Fri, Apr 04, 2014 at 04:26:51PM +0300, Dan Carpenter wrote: > On Fri, Apr 04, 2014 at 02:48:52PM +0300, Kumar Amit Mehta wrote: > > On Fri, Apr 04, 2014 at 02:07:07PM +0300, Dan Carpenter wrote: > > > On Fri, Apr 04, 2014 at 01:05:29PM +0300, Kumar Amit Mehta wrote: > >

[PATCH v2] staging: comedi: drivers: pcl812.c: add curly braces for checkpatch

2014-04-04 Thread Kumar Amit Mehta
Kernel style is that if one side of the if else statement gets has curly braces then both side should have them. Signed-off-by: Kumar Amit Mehta --- drivers/staging/comedi/drivers/pcl812.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers

[PATCH] staging: gdm72xx: wm_ioctl.h: fixed a macro coding style

2012-11-02 Thread Kumar Amit Mehta
fix for macro coding style. Signed-off-by: Kumar Amit Mehta --- drivers/staging/gdm72xx/wm_ioctl.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gdm72xx/wm_ioctl.h b/drivers/staging/gdm72xx/wm_ioctl.h index 9f46e06..4ceecc4 100644 --- a/drivers/staging

[PATCH] staging: iio: adc: ad7280a.c: fixed macro coding style

2012-11-02 Thread Kumar Amit Mehta
remove unnecessary semicolon from the macro definition Signed-off-by: Kumar Amit Mehta --- drivers/staging/iio/adc/ad7280a.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c index cfc39a7..e7cb3b2

Re: [PATCH] staging: gdm72xx: wm_ioctl.h: fixed a macro coding style

2012-11-02 Thread Kumar amit mehta
On Fri, Nov 02, 2012 at 09:55:55AM +0300, Dan Carpenter wrote: > On Thu, Nov 01, 2012 at 11:42:59PM -0700, Kumar Amit Mehta wrote: > > fix for macro coding style. > > > > No. The parenthesis are not needed. I assume this is a > checkpatch.pl warning? > > rega

[PATCH] staging: wlan-ng: hfa384x_usb.c: fixed a coding style issue

2012-11-02 Thread Kumar Amit Mehta
checkpatch.pl throws error message for the current code. This patch fixes coding style issue. Signed-off-by: Kumar Amit Mehta --- drivers/staging/wlan-ng/hfa384x_usb.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers

[PATCH] drivers: ethernet: qlogic: qlge_dbg.c: Fixed a coding style issue

2012-11-04 Thread Kumar Amit Mehta
checkpatch.pl throws error message for the current code. This patch fixes this coding style issue. Signed-off-by: Kumar Amit Mehta --- drivers/net/ethernet/qlogic/qlge/qlge_dbg.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/qlogic

[PATCH] drivers: ethernet: qlogic: netxen_nic_ethtool.c: Fixed a coding style issue

2012-11-04 Thread Kumar Amit Mehta
Fixed some coding style issues. Signed-off-by: Kumar Amit Mehta --- .../ethernet/qlogic/netxen/netxen_nic_ethtool.c| 86 ++-- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c b/drivers/net/ethernet

[PATCH] staging: tidspbridge: dynload: dload_internal.h: fix for coding style issue

2012-11-06 Thread Kumar Amit Mehta
fixed few error messages as reported by checkpatch.pl Signed-off-by: Kumar Amit Mehta --- .../staging/tidspbridge/dynload/dload_internal.h |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/tidspbridge/dynload/dload_internal.h b/drivers/staging

[PATCH] staging: tidspbridge: dynload: reloc.c: checkpatch.pl cleanup

2012-11-06 Thread Kumar Amit Mehta
fix for few error messages as reported by checkpatch.pl Signed-off-by: Kumar Amit Mehta --- drivers/staging/tidspbridge/dynload/reloc.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/tidspbridge/dynload/reloc.c b/drivers/staging/tidspbridge/dynload

[PATCH] staging: comedi: drivers: jr3_pci.c: fix for coding style issue

2012-11-07 Thread Kumar Amit Mehta
fixed few error and warning messages as reported by checkpatch.pl Signed-off-by: Kumar Amit Mehta --- drivers/staging/comedi/drivers/jr3_pci.c |9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi

[PATCH] staging: dgrp: dgrp_tty.c: return an -EFAULT if put_user fails

2012-11-13 Thread Kumar Amit Mehta
This fix adds checks for inspecting the return value of put_user() and return -EFAULT on error. Signed-off-by: Kumar Amit Mehta --- drivers/staging/dgrp/dgrp_tty.c |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/staging/dgrp/dgrp_tty.c b/drivers/staging

[PATCH] staging: dgrp: dgrp_tty.c: return an -EFAULT if get_user() fails

2012-11-14 Thread Kumar Amit Mehta
Inspect the return value of get_user() and return -EFAULT on error. Signed-off-by: Kumar Amit Mehta --- drivers/staging/dgrp/dgrp_tty.c |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/staging/dgrp/dgrp_tty.c b/drivers/staging/dgrp/dgrp_tty.c index b294197

[PATCH 0/2] staging/dgrp/dgrp_tty.c: audit function return values

2012-11-22 Thread Kumar Amit Mehta
This patch series fixes two issues in dgrp driver: i) Removes the TIOCSSOFTCAR ioctl handler from dgrp driver so as to allow the core tty layer to take care of this ioctl instead. ii) Audits the return value of get_user() and put_user() and return -EFAULT in case of error. -- 1.7.9.5 -- To

[PATCH 2/2] staging: dgrp: dgrp_tty.c: Audit the return values of get/put_user()

2012-11-22 Thread Kumar Amit Mehta
fix for missing audits for return values of get_user() and put_user(). Inspecting the return values of get/put_user() would make the access_ok() redundant, hence removing calls to access_ok() in such scenarios. Signed-off-by: Kumar Amit Mehta --- drivers/staging/dgrp/dgrp_tty.c | 22

[PATCH 1/2] staging: dgrp: dgrp_tty.c: Remove the TIOCSSOFTCAR ioctl handler from dgrp driver

2012-11-22 Thread Kumar Amit Mehta
Remove the TIOCSSOFTCAR ioctl handler from dgrp driver and let the core tty layer to take care of this ioctl instead. Signed-off-by: Kumar Amit Mehta --- drivers/staging/dgrp/dgrp_tty.c |7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/dgrp/dgrp_tty.c b/drivers

[PATCH] staging: rtl8187se: r8180_core.c: Inspect the return value of register_netdev()

2012-11-14 Thread Kumar Amit Mehta
Inspect the return value of register_netdev() in the driver probe routine and return -ENODEV in case of error. Signed-off-by: Kumar Amit Mehta --- drivers/staging/rtl8187se/r8180_core.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8187se

[PATCH v2] staging: dgrp: dgrp_tty.c: return an -EFAULT if put_user fails

2012-11-14 Thread Kumar Amit Mehta
Inspect the return value of put_user() and return -EFAULT on error. Signed-off-by: Kumar Amit Mehta --- drivers/staging/dgrp/dgrp_tty.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/dgrp/dgrp_tty.c b/drivers/staging/dgrp/dgrp_tty.c index

[PATCH v3] staging: dgrp: dgrp_tty.c: return an -EFAULT if put_user() fails

2012-11-15 Thread Kumar Amit Mehta
Inspect the return value of put_user() and return -EFAULT on error. Signed-off-by: Kumar Amit Mehta --- drivers/staging/dgrp/dgrp_tty.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/staging/dgrp/dgrp_tty.c b/drivers/staging/dgrp/dgrp_tty.c index

[PATCH] staging: rtl8192e: rtl8192e: rtl_core.c: Audit the return value of register_netdev()

2012-11-15 Thread Kumar Amit Mehta
Inspect the return value of register_netdev() in the driver probe routine and return -ENODEV in case of error. Signed-off-by: Kumar Amit Mehta --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e

[PATCH] staging: dgrp: dgrp_tty.c: Audit the return values of get/put_user()

2012-11-19 Thread Kumar Amit Mehta
-- fix for missing audits for return values of get_user() and put_user(). -- Remove the TIOCSSOFTCAR ioctl handling from dgrp driver. Signed-off-by: Kumar Amit Mehta --- drivers/staging/dgrp/dgrp_tty.c | 25 ++--- 1 file changed, 10 insertions(+), 15 deletions(-) diff

[PATCH] staging: dgrp: dgrp_tty.c: Remove the TIOCSSOFTCAR ioctl handler from dgrp driver

2012-11-19 Thread Kumar Amit Mehta
Remove the TIOCSSOFTCAR ioctl handler from dgrp driver to allow the core tty layer to take care of this ioctl instead. Signed-off-by: Kumar Amit Mehta --- drivers/staging/dgrp/dgrp_tty.c |7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/dgrp/dgrp_tty.c b/drivers

Re: [PATCH] staging: dgrp: dgrp_tty.c: Audit the return values of get/put_user()

2012-11-19 Thread Kumar amit mehta
On Mon, Nov 19, 2012 at 02:15:54PM +0300, Dan Carpenter wrote: > On Mon, Nov 19, 2012 at 04:25:31PM +0530, Kumar Amit Mehta wrote: > > -- fix for missing audits for return values of get_user() and put_user(). > > -- Remove the TIOCSSOFTCAR ioctl handling from dgrp driver. > >

[PATCH] staging: rtl8188eu: core: rtw_wlan_util.c: Fix for NULL dereference

2015-01-26 Thread Kumar Amit Mehta
In rtw_check_bcn_info(), check the return value of kzalloc() before dereferencing it, to avoid NULL pointer dereference. Signed-off-by: Kumar Amit Mehta --- drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/rtl8188eu/core

[PATCH] staging: lustre: lustre: mdc: lproc_mdc.c: Fix for potential NULL pointer dereference

2015-01-26 Thread Kumar Amit Mehta
In mdc_kuc_write(), OBD_ALLOC(lh, len) may leave 'lh' to NULL as kmalloc may fail to allocate memory. This fix adds a check to avoid, dereferencing a NULL pointer. Signed-off-by: Kumar Amit Mehta --- drivers/staging/lustre/lustre/mdc/lproc_mdc.c | 2 ++ 1 file changed, 2 insertions(+) diff

[PATCH] drivers: gpu: drm: i915: intel_fifo_underrun.c: Fix a typo in comment

2015-01-26 Thread Kumar Amit Mehta
The comment for intel_cpu_fifo_underrun_irq_handler() is not consistent with the code and the rest of the comment for this routine. This patch fixes this typo in comment. Signed-off-by: Kumar Amit Mehta --- drivers/gpu/drm/i915/intel_fifo_underrun.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] staging: lustre: lustre: obdclass: obd_mount.c: Fix NULL dereference

2015-01-26 Thread Kumar Amit Mehta
OBD_ALLOC_PTR(uuid) invokes kmalloc, which may return NULL. This fix adds a check before dereferencing such pointer. Signed-off-by: Kumar Amit Mehta --- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/staging/lustre/lustre

  1   2   >