[PATCH v2] p54pci: don't return zero on failure paths in p54p_probe()

2013-01-02 Thread Alexey Khoroshilov
Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Acked-by: Christian Lamparter --- drivers/net/wireless/p54/p54pci.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/p54/p54pci.c b/drivers/net/wireless/p54/p54pci.c

Re: [PATCH] p54pci: don't return zero on failure path in p54p_probe()

2013-01-01 Thread Alexey Khoroshilov
On 01/02/2013 01:45 AM, Christian Lamparter wrote: On Tuesday 01 January 2013 22:11:01 Alexey Khoroshilov wrote: If pci_set_dma_mask() or pci_set_consistent_dma_mask() fails in p54p_probe(), it breaks off initialization, deallocates all resources, but returns zero. The patch implements proper

[PATCH] p54pci: don't return zero on failure path in p54p_probe()

2013-01-01 Thread Alexey Khoroshilov
If pci_set_dma_mask() or pci_set_consistent_dma_mask() fails in p54p_probe(), it breaks off initialization, deallocates all resources, but returns zero. The patch implements proper error code propagation. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey

[PATCH] mei: fix mismatch in mutex unlock-lock in mei_amthif_read()

2012-12-21 Thread Alexey Khoroshilov
ned-off-by: Alexey Khoroshilov --- drivers/misc/mei/amthif.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c index 18794ae..e40ffd9 100644 --- a/drivers/misc/mei/amthif.c +++ b/drivers/misc/mei/amthif.c @@ -187,13 +187

[PATCH] uwb: fix uwb_dev_unlock() missed at an error path in uwb_rc_cmd_async()

2012-11-26 Thread Alexey Khoroshilov
There is the only path in uwb_rc_cmd_async() where rc->uwb_dev is left unlocked. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/uwb/reset.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/uwb/reset.c b/drivers/

[PATCH] jffs2: Make handling of erase_completion_lock consistent in jffs2_do_reserve_space()

2012-11-05 Thread Alexey Khoroshilov
Users of jffs2_do_reserve_space() expect they still held erase_completion_lock after call to it. But there is a path where jffs2_do_reserve_space() leaves erase_completion_lock unlocked. The patch fixes it. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey

[PATCH] extcon: arizona: unlock mutex on error path in arizona_micdet()

2012-11-04 Thread Alexey Khoroshilov
If regmap_read() failed, arizona_micdet() returns IRQ_NONE leaving &info->lock mutex locked as opposed to all other return paths. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/extcon/extcon-arizona.c |1 + 1 file cha

[PATCH] staging: sbe-2t3e3: fix error handling in t3e3_init_channel()

2012-09-25 Thread Alexey Khoroshilov
t3e3_init_channel() incorrectly handles errors in several places: it returns zero and does not deallocate all required resources. The patch fixes that places. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/staging/sbe-2t3e3/module.c

[PATCH] staging/gdm72xx: coding style fixes gdm_qos.c

2012-09-25 Thread Alexey Khoroshilov
Fix checkpatch.pl warnings: WARNING: Prefer pr_debug(... to printk(KERN_DEBUG, ... WARNING: Prefer pr_warn(... to printk(KERN_WARNING, ... WARNING: Prefer pr_err(... to printk(KERN_ERR, ... Signed-off-by: Alexey Khoroshilov --- drivers/staging/gdm72xx/gdm_qos.c |6 +++--- 1 file changed, 3

[PATCH v2] pcmcia: synclink_cs: fix potential tty NULL dereference

2012-09-14 Thread Alexey Khoroshilov
handling updated according Alan Cox feedback. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/char/pcmcia/synclink_cs.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/char/pcmcia

[PATCH] pcmcia: synclink_cs: fix potential tty NULL dereference

2012-09-13 Thread Alexey Khoroshilov
tty_port_tty_get() can return NULL after port hangup that may happen anytime. The patch adds checks that tty_port_tty_get() returns nonNULL around places where tty is actually used. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers

[PATCH] USB: omninet: fix potential tty NULL dereference

2012-09-13 Thread Alexey Khoroshilov
Add check for return value of tty_port_tty_get, since it can return NULL after port hangup that may happen anytime. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/usb/serial/omninet.c |8 +--- 1 file changed, 5 insertions

[PATCH] staging: bcm: use pr_info and pr_err rather than printk

2012-09-02 Thread Alexey Khoroshilov
Convert printk(KERN_INFO to pr_info( and printk(KERN_ERR to pr_err(. Signed-off-by: Alexey Khoroshilov --- drivers/staging/bcm/InterfaceInit.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/bcm/InterfaceInit.c b/drivers/staging/bcm

[PATCH v2] staging: bcm: fix error handling in bcm_init()

2012-09-02 Thread Alexey Khoroshilov
bcm_init() does not have proper error handling of usb_register(). The patch implements one. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/staging/bcm/InterfaceInit.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion

[PATCH] staging: bcm: fix error handling in bcm_init()

2012-09-01 Thread Alexey Khoroshilov
bcm_init() does not have proper error handling of usb_register(). The patch implements one. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/staging/bcm/InterfaceInit.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion

[PATCH] ppdev: ppdev_init: do not return zero in case of failure

2012-09-01 Thread Alexey Khoroshilov
). Signed-off-by: Alexey Khoroshilov --- drivers/char/ppdev.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c index 3fcf80f..d0d824e 100644 --- a/drivers/char/ppdev.c +++ b/drivers/char/ppdev.c @@ -783,7 +783,8 @@ static int __init

[PATCH] virtio: console: fix error handling in init() function

2012-09-01 Thread Alexey Khoroshilov
If register_virtio_driver() fails, virtio-ports class is not destroyed. The patch adds error handling of register_virtio_driver(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/char/virtio_console.c | 12 +++- 1 file

[PATCH v2] [SCSI] mpt2sas: fix double mutex lock in NON_BLOCKING state

2012-08-28 Thread Alexey Khoroshilov
: Alexey Khoroshilov --- drivers/scsi/mpt2sas/mpt2sas_ctl.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/mpt2sas/mpt2sas_ctl.c b/drivers/scsi/mpt2sas/mpt2sas_ctl.c index 49bdd2d..d29ea56 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_ctl.c +++ b/drivers

[RESEND PATCH] [SCSI] mpt2sas: fix double mutex lock in NON_BLOCKING state

2012-08-24 Thread Alexey Khoroshilov
If state is NON_BLOCKING and mutex_trylock is succeed, the control flow goes to mutex_lock_interruptible() that is a deadlock. Found by Linux Driver Verification project (linuxtesting.org). Acked-by: "Nandigama, Nagalakshmi" Signed-off-by: Alexey Khoroshilov --- drivers/sc

[PATCH] [media] ddbridge: fix error handling in module_init_ddbridge()

2012-08-16 Thread Alexey Khoroshilov
If pci_register_driver() failed, resources allocated in ddb_class_create() are leaked. The patch fixes it as well as it replaces -1 with correct error code in ddb_class_create(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/media

[PATCH] [media] ddbridge: fix error handling in module_init_ddbridge()

2012-08-15 Thread Alexey Khoroshilov
If pci_register_driver() failed, resources allocated in ddb_class_create() are leaked. The patch fixes it. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/media/dvb/ddbridge/ddbridge-core.c |6 +- 1 file changed, 5 insertions

[PATCH] HID: hidraw: improve error handling in hidraw_init()

2012-08-15 Thread Alexey Khoroshilov
-off-by: Alexey Khoroshilov --- drivers/hid/hidraw.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index 36fa77b..15e6660 100644 --- a/drivers/hid/hidraw.c +++ b/drivers/hid/hidraw.c @@ -549,21 +549,28 @@ int __init

[PATCH] bio: Fix potential memory leak in bio_find_or_create_slab()

2012-08-08 Thread Alexey Khoroshilov
Do not leak memory by updating pointer with potentially NULL realloc return value. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- fs/bio.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/fs/bio.c b/fs

[PATCH] exofs: check for allocation failure in uri_store()

2012-08-08 Thread Alexey Khoroshilov
There is no memory allocation failure check in uri_store(). That can lead to NULL pointer dereference. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- fs/exofs/sys.c |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git

[PATCH] rndis_wlan: Fix potential memory leak in update_pmkid()

2012-08-08 Thread Alexey Khoroshilov
Do not leak memory by updating pointer with potentially NULL realloc return value. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/net/wireless/rndis_wlan.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH] can/softing: Fix potential memory leak in softing_load_fw()

2012-08-08 Thread Alexey Khoroshilov
Do not leak memory by updating pointer with potentially NULL realloc return value. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/net/can/softing/softing_fw.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff

[PATCH] wusb: Fix potential memory leak in wusb_dev_sec_add()

2012-08-08 Thread Alexey Khoroshilov
Do not leak memory by updating pointer with potentially NULL realloc return value. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/usb/wusbcore/security.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a

[PATCH] net/core: Fix potential memory leak in dev_set_alias()

2012-08-08 Thread Alexey Khoroshilov
Do not leak memory by updating pointer with potentially NULL realloc return value. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- net/core/dev.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/net/core/dev.c b

[PATCH v2] iio/adjd_s311: Fix potential memory leak in adjd_s311_update_scan_mode()

2012-08-08 Thread Alexey Khoroshilov
Do not leak memory by updating pointer with potentially NULL realloc return value. There is no need to preserve data in the buffer, so replace krealloc() by kfree()-kmalloc() pair. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/iio

Re: [PATCH] iio/adjd_s311: Fix potential memory leak in adjd_s311_update_scan_mode()

2012-08-08 Thread Alexey Khoroshilov
return -ENOMEM; > > I suggest to switch back to that original code, there is no need preserve > the data in the buffer as krealloc does That is fine. >> Found by Linux Driver Verification project (linuxtesting.org). >> >> Signed-off-by: Alexey Khoroshilov >&g

[PATCH] USB: whci-hcd: Fix potential memory leak in qset_add_urb_sg()

2012-08-08 Thread Alexey Khoroshilov
(linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/usb/host/whci/qset.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/whci/qset.c b/drivers/usb/host/whci/qset.c index 76083ae..dc31c42 100644 --- a/drivers/usb/host/whci/qset.c +++ b

[PATCH] iio/adjd_s311: Fix potential memory leak in adjd_s311_update_scan_mode()

2012-08-07 Thread Alexey Khoroshilov
Do not leak memory by updating pointer with potentially NULL realloc return value. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/iio/light/adjd_s311.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff

[PATCH] drm/edid: Fix potential memory leak in edid_load()

2012-08-07 Thread Alexey Khoroshilov
Do not leak memory by updating pointer with potentially NULL realloc return value. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/gpu/drm/drm_edid_load.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a

<    1   2   3   4   5