of_graph_get_next_endpoint() returns device_node with refcnt increased,
but these is no of_node_put() for it.
The patch adds one on error and normal paths.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru>
---
drivers
Return code of clk_prepare_enable() is ignored in many places.
The patch adds error handling for all of them.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru>
---
drivers/media/rc/ir-hix5hd2.
to keep clk easily available?
Found by Linux Driver Verification project (linuxtesting.org).
--
Alexey Khoroshilov
Linux Verification Center, ISPRAS
web: http://linuxtesting.org
mt9v032_power_on() leaves clk enabled in case of errors,
but it is not expected by its callers.
There is a similar problem in mt9v032_registered().
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru>
---
drivers/med
If DMA does not support INTERLEAVE, deinterlace_probe() breaks off
initialization, releases dma channel, but returns zero.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru>
---
drivers/media/platform/m2m-deinterlace
data(dev);
int ret;
ret = clk_prepare_enable(cec->clk);
if (ret < 0)
return ret;
return 0;
}
Is it ok to enable/disable clock in rusume/suspend only?
Or have I missed anything?
--
Thank you,
Alexey Khoroshilov
Linux Verification Center, ISPRAS
web: http://linuxtesting.org
dev could be already freed.
Otherwise, dev->lock should not be acquired so early.
Another problem is that on the path going via goto done
there is no mutex_unlock(>lock).
Found by Linux Driver Verification project (linuxtesting.org).
--
Alexey Khoroshilov
Linux Verification Center, I
Memory allocated for maxiradio device is not deallocated when
the device is removed.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru>
---
drivers/media/radio/radio-maxiradio.c | 1 +
1 file changed, 1 insertion(+)
).
Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru>
---
drivers/media/usb/au0828/au0828-video.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/media/usb/au0828/au0828-video.c
b/drivers/media/usb/au0828/au0828-video.c
index 32d7db96479c..7d0ec4cb248c 100644
--- a/drivers/med
It is responsibility of a caller of fops->open(),
to make sure an owner of the fops is available until file is closed.
So, there is no need to lock THIS_MODULE explicitly.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshi...@isp
g.org).
Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru>
Fixes: af8a819a2513 ("[media] lirc_imon: simplify error handling code")
---
drivers/staging/media/lirc/lirc_imon.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/media/lirc/lirc_imon.c
b/drivers/s
On 04.04.2015 16:36, Jonathan Corbet wrote:
On Sat, 4 Apr 2015 03:16:01 +0300
Alexey Khoroshilov khoroshi...@ispras.ru wrote:
If i2c_add_adapter() fails, adap is not deallocated.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi
If i2c_add_adapter() fails, adap is not deallocated.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media/platform/marvell-ccic/cafe-driver.c | 12
1 file changed, 8 insertions(+), 4 deletions
There is no usb_put_dev() on failure paths in usbvision_probe().
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media/usb/usbvision/usbvision-video.c | 24 +---
1 file changed, 17 insertions
Memory allocated for sh_vou_file is not deallocated
on error paths in sh_vou_open().
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media/platform/sh_vou.c | 9 ++---
1 file changed, 6 insertions(+), 3
).
So the patch moves usb_get_dev() below (before the first use)
and fixes another failure path.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media/usb/cx231xx/cx231xx-cards.c | 7 ---
1 file changed, 4
-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media/rc/imon.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c
index 7115e68ba697..06ff61ec3e1e 100644
--- a/drivers/media/rc/imon.c
+++ b/drivers/media/rc/imon.c
@@ -2181,6 +2181,7
On 09.09.2014 14:39, Sean Young wrote:
On Tue, Sep 09, 2014 at 02:10:43AM +0400, Alexey Khoroshilov wrote:
mceusb_init_rc_dev() does usb_get_dev(), but there is no any
usb_put_dev() in the driver.
drivers/media/rc/imon.c suffers from the same problem.
Thanks
Sean
Yes, our static analyzers
(linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media/rc/mceusb.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c
index 45b0894288e5..23e532da0cf7 100644
--- a/drivers
Error handling code in poseidon_probe() misses usb_put_intf()
and usb_put_dev().
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media/usb/tlg2300/pd-main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git
Error handling code in usbtv_probe() misses usb_put_dev().
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media/usb/usbtv/usbtv-core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/usb
() [ATOMIC CONTEXT]
- ivtv_yuv_udma_stream_frame() [with mutex held]
- ivtv_write() [with mutex held]
The patch adds gfp_t argument and implements its usage according to the context.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi
There is request_irq() in init_device(), but the interrupt is not removed
on failure paths. The patch adds proper error handling.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media/i2c/adv7180.c | 18
Failure handling is incomplete in as102_usb_probe().
The patch implements proper resource deallocations.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/staging/media/as102/as102_usb_drv.c | 9 -
1 file
There is usb_get_dev() in go7007_loader_probe(),
but there is no usb_put_dev() anywhere.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/staging/media/go7007/go7007-loader.c | 4 +++-
1 file changed, 3 insertions
There are several failure paths in cxusb_i2c_xfer(), where
d-i2c_mutex is left held. The patch fixes them.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media/usb/dvb-usb/cxusb.c | 19 ---
1
project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media/dvb-core/dvb_demux.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/media/dvb-core/dvb_demux.c
b/drivers/media/dvb-core/dvb_demux.c
index 3485655..6de3bd0 100644
())
are just a few of them.
The patch fixes the issues in cx231xx_usb_probe() and cx231xx_init_dev()
by moving usb_get_dev(interface_to_usbdev(interface)) below in code and
implementing proper error handling.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov
Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media/dvb-core/dvb_demux.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/media/dvb-core/dvb_demux.c
b/drivers/media/dvb-core/dvb_demux.c
index
If v4l2_fh_open() fails in dev_open(), gspca_dev-module left locked.
The patch adds module_put(gspca_dev-module) on this path.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media/usb/gspca/gspca.c | 6 +-
1
done with GFP_KERNEL;
- refactors ttusb_dec_boot_dsp() in an equivalent way except for returning 0
instead of 1 if ttusb_dec_boot_dsp() succeed in (!mode) branch.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers
and by the way fixes
goto label in error handling of registering videodev.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media/usb/hdpvr/hdpvr-core.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions
All poseidon init functions properly return error codes,
but they are ignored by poseidon_probe(). The patch implements
handling of error cases.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media/usb/tlg2300
strange, so the patch removes down_firmware argument
of check_firmware() and returns error code if check_firmware() fails
in poseidon_probe().
Not tested on real hardware.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
probe() should not return 0 for unsupported devices, but go7007_usb_probe()
does.
The patch fixes it to return -ENODEV.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/staging/media/go7007/go7007-usb.c | 4
If something goes wrong starting from i2c_add_adapter(),
ttusb-iso_urb[] and ttusb itself are not deallocated.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c | 2 ++
1
there.
It calls usbvision_release() if allocation of
usbvision-alt_max_pkt_size fails as soon as usbvision_release()
is safe to work with incompletely initialized usbvision structure.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/staging/media/lirc/lirc_imon.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/media/lirc/lirc_imon.c
b/drivers/staging/media/lirc/lirc_imon.c
index 0a2c45d..4afa7da 100644
--- a/drivers/staging
by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media/radio/wl128x/fmdrv_common.c | 24 ++--
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/drivers/media/radio/wl128x/fmdrv_common.c
b
and cx8802_irq.
That means a deadlock is possible if an interrupt happens while suspend or
resume owns the lock.
The patch replaces spin_lock/spin_unlock with
spin_lock_irqsave/spin_unlock_irqrestore.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov
On 02/20/2013 10:58 AM, Manu Abraham wrote:
Hi,
On Wed, Feb 20, 2013 at 12:28 AM, Alexey Khoroshilov
khoroshi...@ispras.ru wrote:
goto err and goto err_gateoff before mutex_lock(state-internal-demod_lock)
lead to unlock of unheld mutex in stv090x_sleep().
Out of curiosity, what happens when
goto err and goto err_gateoff before mutex_lock(state-internal-demod_lock)
lead to unlock of unheld mutex in stv090x_sleep().
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media/dvb-frontends/stv090x.c | 22
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 khoroshi
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 khoroshi...@ispras.ru
---
drivers/media/dvb/ddbridge/ddbridge-core.c |6 +-
1 file
If sanity check fails in scu_command(), goto error leads to unlock of
an unheld mutex. The check should not fail in reality, but it nevertheless
worth fixing.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media
On Mon, 19 Mar 2012 14:47:54 -0300, Mauro Carvalho Chehab
mche...@redhat.com wrote:
Em 07-03-2012 16:21, Alexey Khoroshilov escreveu:
dib0700_i2c_xfer [_new and _legacy] leave i2c_mutex locked on error
paths.
The patch adds appropriate unlocks.
Found by Linux Driver Verification project
The patch replaces Dib*Lock macros with direct calls to mutex functions
as soon as they just make the driver code harder to review
(per request of Mauro).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media/dvb/frontends/dib9000.c | 128 +++--
1
dib0700_i2c_xfer [_new and _legacy] leave i2c_mutex locked on error paths.
The patch adds appropriate unlocks.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media/dvb/dvb-usb/dib0700_core.c |9 ++---
1
There are several error paths, where state-platform.risc.mem_mbx_lock
is not unlocked. The patch fixes it.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media/dvb/frontends/dib9000.c |6 +-
1 files
DibAcquireLock() is implemented as mutex_lock_interruptible()
but the driver does not handle unsuccessful locking.
As a result it may lead to unlock of an unheld mutex.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/staging/media/go7007/s2250-board.c | 16 ++--
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/media/go7007/s2250-board.c
b/drivers/staging/media/go7007/s2250-board.c
index e7736a9..014d384 100644
possible fail.
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media/video/hdpvr/hdpvr-core.c |8
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/media/video/hdpvr/hdpvr-core.c
b/drivers/media/video/hdpvr/hdpvr-core.c
index 441dacf..fe0a088
radio-int_in_urb is not deallocated on error paths in
si470x_usb_driver_probe().
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media/radio/si470x/radio-si470x-usb.c |4 +++-
1 files changed, 3 insertions
There are a couple of places where mutex_unlock() is called even
if mutex_lock_interruptible() failed. The patch fixes the issue.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru
---
drivers/media/dvb/dvb-usb/lmedm04.c
54 matches
Mail list logo