[PATCH] net: mv643xx_eth: disable clk on error path in mv643xx_eth_shared_probe()

2019-02-15 Thread Alexey Khoroshilov
If mv643xx_eth_shared_of_probe() fails, mv643xx_eth_shared_probe() leaves clk undisabled. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/net/ethernet/marvell/mv643xx_eth.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion

[PATCH] net: stmmac: dwmac-rk: fix error handling in rk_gmac_powerup()

2019-01-26 Thread Alexey Khoroshilov
If phy_power_on() fails in rk_gmac_powerup(), clocks are left enabled. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH v2] usb: dwc3: exynos: Fix error handling of clk_prepare_enable

2019-01-21 Thread Alexey Khoroshilov
If clk_prepare_enable() fails in dwc3_exynos_probe() or in dwc3_exynos_resume(), exynos->clks[0] is left undisabled because of usage preincrement in while condition. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Fixes: 9f2168367a0a ("u

[PATCH] usb: dwc3: exynos: Fix error handling of clk_prepare_enable

2019-01-18 Thread Alexey Khoroshilov
If clk_prepare_enable() fails in dwc3_exynos_probe(), exynos->clks[0] is left undisabled because of usage preincrement in while condition. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Fixes: 9f2168367a0a ("usb: dwc3: exynos: Rewo

[PATCH v2 1/2] media: tw9910: fix failure handling in tw9910_power_on()

2018-12-30 Thread Alexey Khoroshilov
If gpiod_get_optional() fails in tw9910_power_on(), clk is left undisabled. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- v2: reset pdn_gpio as well as Jacopo Mondi suggested. drivers/media/i2c/tw9910.c | 5 + 1 file changed, 5

[PATCH v2 2/2] media: tw9910: add helper function for setting gpiod value

2018-12-30 Thread Alexey Khoroshilov
tw9910 driver tries to sleep for the smae period of time after each gpiod_set_value(). The patch moves duplicated code to a helper function. Signed-off-by: Alexey Khoroshilov --- drivers/media/i2c/tw9910.c | 30 +- 1 file changed, 13 insertions(+), 17 deletions

Re: [PATCH] media: tw9910: add missed clk_disable_unprepare() on failure path

2018-12-30 Thread Alexey Khoroshilov
Hi Jacopo, On 30.12.2018 12:49, Jacopo Mondi wrote: > On Sun, Dec 30, 2018 at 12:35:20AM +0300, Alexey Khoroshilov wrote: >> If gpiod_get_optional() fails in tw9910_power_on(), clk is left undisabled. > > Correct, thanks for spotting this. > > I think pdn_gpio s

[PATCH] media: tw9910: add missed clk_disable_unprepare() on failure path

2018-12-29 Thread Alexey Khoroshilov
If gpiod_get_optional() fails in tw9910_power_on(), clk is left undisabled. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/media/i2c/tw9910.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/i2c/tw9910.c b/drivers

net: hns: question regarding ae_node device node refcounting

2018-12-22 Thread Alexey Khoroshilov
nic_dev_probe() or in hns_nic_dev_remove()? Or may be it is managed by fwnode somehow? -- Alexey Khoroshilov Linux Verification Center, ISPRAS web: http://linuxtesting.org

Re: [PATCH] mailbox: imx: Fix clk handling in imx_mu_probe()

2018-12-16 Thread Alexey Khoroshilov
) { unsigned long flags; if (clk == NULL || IS_ERR(clk)) return -EINVAL; So, I am not sure the NULL resistance is a part of the clk_enable() contract? -- Alexey On 17.12.2018 9:01, Oleksij Rempel wrote: > Hi Alexey, > > On Sun, Dec 16, 2018 at 02:01:44AM +0300, Alexey Kh

[PATCH] mailbox: imx: Fix clk handling in imx_mu_probe()

2018-12-15 Thread Alexey Khoroshilov
ion project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/mailbox/imx-mailbox.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c index 363d35d5e49d..ddde398f576e 100644 --- a/driv

[PATCH] soc: qcom: gsbi: Fix error handling in gsbi_probe()

2018-12-07 Thread Alexey Khoroshilov
If of_platform_populate() fails in gsbi_probe(), gsbi->hclk is left undisabled. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/soc/qcom/qcom_gsbi.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/driv

[PATCH] soc: qcom: gsbi: Fix error handling in gsbi_probe()

2018-12-07 Thread Alexey Khoroshilov
If of_platform_populate() fails in gsbi_probe(), gsbi->hclk is left undisabled. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/soc/qcom/qcom_gsbi.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/driv

[PATCH] video: clps711x-fb: release disp device node in probe()

2018-11-02 Thread Alexey Khoroshilov
clps711x_fb_probe() increments refcnt of disp device node by of_parse_phandle() and leaves it undecremented on both successful and error paths. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/video/fbdev/clps711x-fb.c | 5 - 1

[PATCH] video: clps711x-fb: release disp device node in probe()

2018-11-02 Thread Alexey Khoroshilov
clps711x_fb_probe() increments refcnt of disp device node by of_parse_phandle() and leaves it undecremented on both successful and error paths. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/video/fbdev/clps711x-fb.c | 5 - 1

[PATCH] mfd: ti_am335x_tscadc: release device nodes in ti_tscadc_probe()

2018-10-26 Thread Alexey Khoroshilov
ti_tscadc_probe() increments refcnt of tsc and adc device nodes and leaves it undecremented. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/mfd/ti_am335x_tscadc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mfd

[PATCH] mfd: ti_am335x_tscadc: release device nodes in ti_tscadc_probe()

2018-10-26 Thread Alexey Khoroshilov
ti_tscadc_probe() increments refcnt of tsc and adc device nodes and leaves it undecremented. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/mfd/ti_am335x_tscadc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mfd

mfd: syscon: syscon_node_to_regmap() and device_node refcounting

2018-10-13 Thread Alexey Khoroshilov
Hello, Could you please clarify why it is safe to store device_node pointer in of_syscon_register()? Who is responsible to make sure that it is not disappear? static struct syscon *of_syscon_register(struct device_node *np) { ... syscon->np = np; } -- Thank you, Alexey Khoroshi

mfd: syscon: syscon_node_to_regmap() and device_node refcounting

2018-10-13 Thread Alexey Khoroshilov
Hello, Could you please clarify why it is safe to store device_node pointer in of_syscon_register()? Who is responsible to make sure that it is not disappear? static struct syscon *of_syscon_register(struct device_node *np) { ... syscon->np = np; } -- Thank you, Alexey Khoroshi

[PATCH] watchdog: ts4800: release syscon device node in ts4800_wdt_probe()

2018-10-13 Thread Alexey Khoroshilov
Put syscon device node when it is not needed anymore. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/watchdog/ts4800_wdt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/watchdog/ts4800_wdt.c b/drivers/watchdog

[PATCH] watchdog: ts4800: release syscon device node in ts4800_wdt_probe()

2018-10-13 Thread Alexey Khoroshilov
Put syscon device node when it is not needed anymore. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/watchdog/ts4800_wdt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/watchdog/ts4800_wdt.c b/drivers/watchdog

[PATCH] staging: axis-fifo: add error handling of class_create()

2018-09-28 Thread Alexey Khoroshilov
Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/staging/axis-fifo/axis-fifo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c index abeee0ecc122

[PATCH] staging: axis-fifo: add error handling of class_create()

2018-09-28 Thread Alexey Khoroshilov
Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/staging/axis-fifo/axis-fifo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c index abeee0ecc122

[PATCH] iio: adc: imx25-gcq: Fix leak of device_node in mx25_gcq_setup_cfgs()

2018-09-21 Thread Alexey Khoroshilov
Leaving for_each_child_of_node loop we should release child device node, if it is not stored for future use. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/iio/adc/fsl-imx25-gcq.c | 6 ++ 1 file changed, 6 insertions(+) diff

[PATCH] iio: adc: imx25-gcq: Fix leak of device_node in mx25_gcq_setup_cfgs()

2018-09-21 Thread Alexey Khoroshilov
Leaving for_each_child_of_node loop we should release child device node, if it is not stored for future use. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/iio/adc/fsl-imx25-gcq.c | 6 ++ 1 file changed, 6 insertions(+) diff

[PATCH] spi: pic32-sqi: remove unnecessary of_node_get()

2018-09-14 Thread Alexey Khoroshilov
off-by: Alexey Khoroshilov --- drivers/spi/spi-pic32-sqi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-pic32-sqi.c b/drivers/spi/spi-pic32-sqi.c index bd1c6b53283f..62e6bf1f50b1 100644 --- a/drivers/spi/spi-pic32-sqi.c +++ b/drivers/spi/spi-pic32-sqi.c @@ -65

[PATCH] spi: pic32-sqi: remove unnecessary of_node_get()

2018-09-14 Thread Alexey Khoroshilov
off-by: Alexey Khoroshilov --- drivers/spi/spi-pic32-sqi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-pic32-sqi.c b/drivers/spi/spi-pic32-sqi.c index bd1c6b53283f..62e6bf1f50b1 100644 --- a/drivers/spi/spi-pic32-sqi.c +++ b/drivers/spi/spi-pic32-sqi.c @@ -65

[PATCH] spi: pic32: remove unnecessary of_node_get()

2018-09-06 Thread Alexey Khoroshilov
off-by: Alexey Khoroshilov --- drivers/spi/spi-pic32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-pic32.c b/drivers/spi/spi-pic32.c index f8a45af1fa9f..46ff76193ee1 100644 --- a/drivers/spi/spi-pic32.c +++ b/drivers/spi/spi-pic32.c @@ -774,7 +774,7 @@ sta

[PATCH] spi: pic32: remove unnecessary of_node_get()

2018-09-06 Thread Alexey Khoroshilov
off-by: Alexey Khoroshilov --- drivers/spi/spi-pic32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-pic32.c b/drivers/spi/spi-pic32.c index f8a45af1fa9f..46ff76193ee1 100644 --- a/drivers/spi/spi-pic32.c +++ b/drivers/spi/spi-pic32.c @@ -774,7 +774,7 @@ sta

[PATCH] gpio: dwapb: Fix error handling in dwapb_gpio_probe()

2018-08-28 Thread Alexey Khoroshilov
If dwapb_gpio_add_port() fails in dwapb_gpio_probe(), gpio->clk is left undisabled. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/gpio/gpio-dwapb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpio-dwapb.

[PATCH] gpio: dwapb: Fix error handling in dwapb_gpio_probe()

2018-08-28 Thread Alexey Khoroshilov
If dwapb_gpio_add_port() fails in dwapb_gpio_probe(), gpio->clk is left undisabled. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/gpio/gpio-dwapb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpio-dwapb.

[PATCH] clk: cdce925: release child device nodes

2018-08-21 Thread Alexey Khoroshilov
of_get_child_by_name() returns device node with refcount incremented, but there is no decrement in cdce925_probe(). The patch adds one. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/clk/clk-cdce925.c | 1 + 1 file changed, 1

[PATCH] clk: cdce925: release child device nodes

2018-08-21 Thread Alexey Khoroshilov
of_get_child_by_name() returns device node with refcount incremented, but there is no decrement in cdce925_probe(). The patch adds one. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/clk/clk-cdce925.c | 1 + 1 file changed, 1

[PATCH] rtc: isl1208: fix error handling in isl1208_probe()

2018-08-08 Thread Alexey Khoroshilov
After moving rtc_register_device() sysfs group is left unremoved on the error path. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Fixes: 236b7187034e ("rtc: isl1208: switch to rtc_register_device") --- drivers/rtc/rtc-isl1208.c | 7

[PATCH] rtc: isl1208: fix error handling in isl1208_probe()

2018-08-08 Thread Alexey Khoroshilov
After moving rtc_register_device() sysfs group is left unremoved on the error path. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Fixes: 236b7187034e ("rtc: isl1208: switch to rtc_register_device") --- drivers/rtc/rtc-isl1208.c | 7

[PATCH] ASoC: tegra_alc5632: fix device_node refcounting

2018-07-27 Thread Alexey Khoroshilov
(linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- sound/soc/tegra/tegra_alc5632.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/sound/soc/tegra/tegra_alc5632.c b/sound/soc/tegra/tegra_alc5632.c index 5197d6b18cb6..98d87801d57a 100644 --- a/sound/soc/tegra

[PATCH] ASoC: tegra_alc5632: fix device_node refcounting

2018-07-27 Thread Alexey Khoroshilov
(linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- sound/soc/tegra/tegra_alc5632.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/sound/soc/tegra/tegra_alc5632.c b/sound/soc/tegra/tegra_alc5632.c index 5197d6b18cb6..98d87801d57a 100644 --- a/sound/soc/tegra

regulator: bcm590xx: of_node_put(np) missing

2018-07-21 Thread Alexey Khoroshilov
Hello, bcm590xx_parse_dt_reg_data() calls of_node_get(np), but there is nowhere of_node_put(np) in the driver. Should we add of_node_put(np) and what is timeframe of_node_get(np) required for? Found by Linux Driver Verification project (linuxtesting.org). -- Alexey Khoroshilov Linux

regulator: bcm590xx: of_node_put(np) missing

2018-07-21 Thread Alexey Khoroshilov
Hello, bcm590xx_parse_dt_reg_data() calls of_node_get(np), but there is nowhere of_node_put(np) in the driver. Should we add of_node_put(np) and what is timeframe of_node_get(np) required for? Found by Linux Driver Verification project (linuxtesting.org). -- Alexey Khoroshilov Linux

Re: [PATCH] Input: pxrc - fix leak of usb_device

2018-07-15 Thread Alexey Khoroshilov
Dear Marcus, On 15.07.2018 10:42, Marcus Folkesson wrote: > On Sat, Jul 14, 2018 at 08:51:09AM +, Dmitry Torokhov wrote: >> On Sat, Jul 14, 2018 at 10:09:20AM +0200, Marcus Folkesson wrote: >>> Hi Alexey, >>> >>> Good catch! >>> >>> On Fri

Re: [PATCH] Input: pxrc - fix leak of usb_device

2018-07-15 Thread Alexey Khoroshilov
Dear Marcus, On 15.07.2018 10:42, Marcus Folkesson wrote: > On Sat, Jul 14, 2018 at 08:51:09AM +, Dmitry Torokhov wrote: >> On Sat, Jul 14, 2018 at 10:09:20AM +0200, Marcus Folkesson wrote: >>> Hi Alexey, >>> >>> Good catch! >>> >>> On Fri

[PATCH] Input: pxrc - fix leak of usb_device

2018-07-13 Thread Alexey Khoroshilov
pxrc_probe() calls usb_get_dev(), but there is no usb_put_dev() anywhere in the driver. The patch adds one to error handling code and to pxrc_disconnect(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/input/joystick/pxrc.c | 2

[PATCH] Input: pxrc - fix leak of usb_device

2018-07-13 Thread Alexey Khoroshilov
pxrc_probe() calls usb_get_dev(), but there is no usb_put_dev() anywhere in the driver. The patch adds one to error handling code and to pxrc_disconnect(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/input/joystick/pxrc.c | 2

[PATCH] sample: vfio-mdev: avoid deadlock in mdev_access()

2018-07-06 Thread Alexey Khoroshilov
mdev_access() calls mbochs_get_page() with mdev_state->ops_lock held, while mbochs_get_page() locks the mutex by itself. It leads to unavoidable deadlock. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- samples/vfio-mdev/mbochs.c | 4 +++-

[PATCH] sample: vfio-mdev: avoid deadlock in mdev_access()

2018-07-06 Thread Alexey Khoroshilov
mdev_access() calls mbochs_get_page() with mdev_state->ops_lock held, while mbochs_get_page() locks the mutex by itself. It leads to unavoidable deadlock. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- samples/vfio-mdev/mbochs.c | 4 +++-

[PATCH] ASoC: tegra: fix device_node refcounting

2018-06-15 Thread Alexey Khoroshilov
tegra_rt5677_probe() gets a couple of device nodes with of_parse_phandle(), but there is no release of them. The patch adds the release to tegra_rt5677_remove() and to error handling paths in the probe. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey

[PATCH] ASoC: tegra: fix device_node refcounting

2018-06-15 Thread Alexey Khoroshilov
tegra_rt5677_probe() gets a couple of device nodes with of_parse_phandle(), but there is no release of them. The patch adds the release to tegra_rt5677_remove() and to error handling paths in the probe. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey

[PATCH] ASoC: rockchip: put device_node on remove

2018-06-09 Thread Alexey Khoroshilov
snd_rk_mc_probe() gets a couple of device nodes with of_parse_phandle(), but there is no release of them. The patch adds remove handler and proper error handling in the probe. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- sound/soc

[PATCH] ASoC: rockchip: put device_node on remove

2018-06-09 Thread Alexey Khoroshilov
snd_rk_mc_probe() gets a couple of device nodes with of_parse_phandle(), but there is no release of them. The patch adds remove handler and proper error handling in the probe. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- sound/soc

[PATCH] power: reset: zx-reboot: put device node in zx_reboot_probe()

2018-06-02 Thread Alexey Khoroshilov
zx_reboot_probe() increments refcnt of zx296702-pcu device node by of_find_compatible_node() and leaves it undecremented on both successful and error paths. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/power/reset/zx-reboot.c | 1

[PATCH] power: reset: zx-reboot: put device node in zx_reboot_probe()

2018-06-02 Thread Alexey Khoroshilov
zx_reboot_probe() increments refcnt of zx296702-pcu device node by of_find_compatible_node() and leaves it undecremented on both successful and error paths. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/power/reset/zx-reboot.c | 1

[PATCH] media: tc358743: release device_node in tc358743_probe_of()

2018-05-25 Thread Alexey Khoroshilov
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

[PATCH] media: tc358743: release device_node in tc358743_probe_of()

2018-05-25 Thread Alexey Khoroshilov
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 --- drivers/media/i2c/tc358743.c | 5

[PATCH] aic94xx: don't return zero on failure paths in aic94xx_init()

2018-05-18 Thread Alexey Khoroshilov
che...@ispras.ru> Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/scsi/aic94xx/aic94xx_init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c index 6c838865ac5a..4a4746c

[PATCH] aic94xx: don't return zero on failure paths in aic94xx_init()

2018-05-18 Thread Alexey Khoroshilov
-by: Alexey Khoroshilov --- drivers/scsi/aic94xx/aic94xx_init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c index 6c838865ac5a..4a4746cc6745 100644 --- a/drivers/scsi/aic94xx/aic94xx_init.c +++ b

[PATCH v3] mtd: nxp-spifi: release flash_np in nxp_spifi_probe()

2018-05-09 Thread Alexey Khoroshilov
nxp_spifi_probe() increments refcnt of SPI flash device node by of_get_next_available_child() and leaves it undecremented on both successful and error paths. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- v3

[PATCH v3] mtd: nxp-spifi: release flash_np in nxp_spifi_probe()

2018-05-09 Thread Alexey Khoroshilov
nxp_spifi_probe() increments refcnt of SPI flash device node by of_get_next_available_child() and leaves it undecremented on both successful and error paths. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- v3: Move of_node_put() before return

[PATCH v2] mtd: nxp-spifi: release flash_np in nxp_spifi_probe()

2018-05-09 Thread Alexey Khoroshilov
nxp_spifi_probe() increments refcnt of SPI flash device node by of_get_next_available_child() and leaves it undecremented on both successful and error paths. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drive

[PATCH v2] mtd: nxp-spifi: release flash_np in nxp_spifi_probe()

2018-05-09 Thread Alexey Khoroshilov
nxp_spifi_probe() increments refcnt of SPI flash device node by of_get_next_available_child() and leaves it undecremented on both successful and error paths. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/mtd/spi-nor/nxp-spifi.c | 6

Re: [PATCH] mtd: nxp-spifi: decrement flash_np refcnt on error paths

2018-05-09 Thread Alexey Khoroshilov
On 09.05.2018 12:42, Boris Brezillon wrote: > On Tue, 8 May 2018 23:47:36 +0300 > Alexey Khoroshilov <khoroshi...@ispras.ru> wrote: > >> nxp_spifi_probe() increments refcnt of SPI flash device node by >> of_get_next_available_child() and then it passe

Re: [PATCH] mtd: nxp-spifi: decrement flash_np refcnt on error paths

2018-05-09 Thread Alexey Khoroshilov
On 09.05.2018 12:42, Boris Brezillon wrote: > On Tue, 8 May 2018 23:47:36 +0300 > Alexey Khoroshilov wrote: > >> nxp_spifi_probe() increments refcnt of SPI flash device node by >> of_get_next_available_child() and then it passes the node >> to mtd devi

[PATCH] mtd: nxp-spifi: decrement flash_np refcnt on error paths

2018-05-08 Thread Alexey Khoroshilov
project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/mtd/spi-nor/nxp-spifi.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/spi-nor/nxp-spifi.c b/drivers/mtd/spi-nor/nxp-spifi.c index 153742

[PATCH] mtd: nxp-spifi: decrement flash_np refcnt on error paths

2018-05-08 Thread Alexey Khoroshilov
project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/mtd/spi-nor/nxp-spifi.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/spi-nor/nxp-spifi.c b/drivers/mtd/spi-nor/nxp-spifi.c index 15374216d4d9..8919e31f2ab8 100644

Re: [PATCH] power: supply: ltc2941-battery-gauge: Release device_node in ltc294x_i2c_probe()

2018-05-08 Thread Alexey Khoroshilov
Hi, On 01.05.2018 15:39, Sebastian Reichel wrote: > Hi, > > On Sun, Apr 29, 2018 at 01:35:55AM +0300, Alexey Khoroshilov wrote: >> There is of_node_get(client->dev.of_node) in ltc294x_i2c_probe(), >> but these is no of_node_put() somethere in the driver. >>

Re: [PATCH] power: supply: ltc2941-battery-gauge: Release device_node in ltc294x_i2c_probe()

2018-05-08 Thread Alexey Khoroshilov
Hi, On 01.05.2018 15:39, Sebastian Reichel wrote: > Hi, > > On Sun, Apr 29, 2018 at 01:35:55AM +0300, Alexey Khoroshilov wrote: >> There is of_node_get(client->dev.of_node) in ltc294x_i2c_probe(), >> but these is no of_node_put() somethere in the driver. >>

[PATCH v2] spi: meson-spicc: Fix error handling in meson_spicc_probe()

2018-04-28 Thread Alexey Khoroshilov
If devm_spi_register_master() fails in meson_spicc_probe(), spicc->core is left undisabled. The patch fixes that. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> Reviewed-by: Neil Armstrong <narmstr...@baylibre

[PATCH v2] spi: meson-spicc: Fix error handling in meson_spicc_probe()

2018-04-28 Thread Alexey Khoroshilov
If devm_spi_register_master() fails in meson_spicc_probe(), spicc->core is left undisabled. The patch fixes that. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Reviewed-by: Neil Armstrong --- v2: Fix subject as Neil Armstrong noted. driv

[PATCH] power: supply: ltc2941-battery-gauge: Release device_node in ltc294x_i2c_probe()

2018-04-28 Thread Alexey Khoroshilov
There is of_node_get(client->dev.of_node) in ltc294x_i2c_probe(), but these is no of_node_put() somethere in the driver. The patch adds one on error and normal paths. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@isp

[PATCH] power: supply: ltc2941-battery-gauge: Release device_node in ltc294x_i2c_probe()

2018-04-28 Thread Alexey Khoroshilov
There is of_node_get(client->dev.of_node) in ltc294x_i2c_probe(), but these is no of_node_put() somethere in the driver. The patch adds one on error and normal paths. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/power/sup

[PATCH] iio: adc: ad799x: Fix error handling in ad799x_probe()

2018-04-20 Thread Alexey Khoroshilov
In case of errors in write/read config, st->vref is left undisabled. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> Fixes: 0f7ddcc1bff1 ("iio:adc:ad799x: Write default config on probe and reset alert s

[PATCH] iio: adc: ad799x: Fix error handling in ad799x_probe()

2018-04-20 Thread Alexey Khoroshilov
In case of errors in write/read config, st->vref is left undisabled. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Fixes: 0f7ddcc1bff1 ("iio:adc:ad799x: Write default config on probe and reset alert status on probe") --- dr

[PATCH] spi: meson-axg: Fix error handling in meson_spicc_probe()

2018-04-13 Thread Alexey Khoroshilov
If devm_spi_register_master() fails in meson_spicc_probe(), spicc->core is left undisabled. The patch fixes that. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/spi/spi-meson-spicc.c | 11 --

[PATCH] spi: meson-axg: Fix error handling in meson_spicc_probe()

2018-04-13 Thread Alexey Khoroshilov
If devm_spi_register_master() fails in meson_spicc_probe(), spicc->core is left undisabled. The patch fixes that. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/spi/spi-meson-spicc.c | 11 --- 1 file changed, 8 inserti

[PATCH] spi: stm32: Fix error handling in stm32_spi_probe()

2018-03-30 Thread Alexey Khoroshilov
clk_get_rate() is below clk_prepare_enable(), so its error should lead to goto err_clk_disable, not to err_master_put. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/spi/spi-stm32.c | 2 +- 1 file chan

[PATCH] spi: stm32: Fix error handling in stm32_spi_probe()

2018-03-30 Thread Alexey Khoroshilov
clk_get_rate() is below clk_prepare_enable(), so its error should lead to goto err_clk_disable, not to err_master_put. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/spi/spi-stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] watchdog: davinci_wdt: fix error handling in davinci_wdt_probe()

2018-03-23 Thread Alexey Khoroshilov
clk_disable_unprepare() was added to one error path, but there is another one. The patch makes sure clk is disabled at the both of them. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/watchdog/davinci

[PATCH] watchdog: davinci_wdt: fix error handling in davinci_wdt_probe()

2018-03-23 Thread Alexey Khoroshilov
clk_disable_unprepare() was added to one error path, but there is another one. The patch makes sure clk is disabled at the both of them. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/watchdog/davinci_wdt.c | 15 +++ 1

[PATCH v2] spi: jcore: disable ref_clk after getting its rate

2018-03-17 Thread Alexey Khoroshilov
Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- v2: There is no reason to wait for remove to disable ref_clk. drivers/spi/spi-jcore.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/spi/spi-jcore.c b/d

[PATCH v2] spi: jcore: disable ref_clk after getting its rate

2018-03-17 Thread Alexey Khoroshilov
Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- v2: There is no reason to wait for remove to disable ref_clk. drivers/spi/spi-jcore.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/spi/spi-jcore.c b/drivers/spi/spi-jcore.c index

[PATCH] spi: jcore: disable clock on remove

2018-03-16 Thread Alexey Khoroshilov
The driver does not disable ref_clk on remove. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/spi/spi-jcore.c | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff

[PATCH] spi: jcore: disable clock on remove

2018-03-16 Thread Alexey Khoroshilov
The driver does not disable ref_clk on remove. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/spi/spi-jcore.c | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/drivers/spi/spi-jcore.c b

[PATCH] watchdog: sprd_wdt: Fix error handling in sprd_wdt_enable()

2018-03-08 Thread Alexey Khoroshilov
If clk_prepare_enable(wdt->rtc_enable) fails, wdt->enable clock is left enabled. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/watchdog/sprd_wdt.c | 4 +++- 1 file changed, 3 insertions(+)

[PATCH] watchdog: sprd_wdt: Fix error handling in sprd_wdt_enable()

2018-03-08 Thread Alexey Khoroshilov
If clk_prepare_enable(wdt->rtc_enable) fails, wdt->enable clock is left enabled. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/watchdog/sprd_wdt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/d

[PATCH] serial: mxs-auart: disable clks of Alphascale ASM9260

2018-03-02 Thread Alexey Khoroshilov
In case of Alphascale ASM9260 probe() enables s->clk and s->clk_ahb via mxs_get_clks(), but there is no disable of the clocks. The patch adds it to error paths and to mxs_auart_remove(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <

[PATCH] serial: mxs-auart: disable clks of Alphascale ASM9260

2018-03-02 Thread Alexey Khoroshilov
In case of Alphascale ASM9260 probe() enables s->clk and s->clk_ahb via mxs_get_clks(), but there is no disable of the clocks. The patch adds it to error paths and to mxs_auart_remove(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov

[PATCH] phy: lpc18xx-usb-otg: error handling in lpc18xx_usb_otg_phy_power_on()

2018-02-22 Thread Alexey Khoroshilov
If regmap_update_bits() fails in lpc18xx_usb_otg_phy_power_on(), lpc->clk is left enabled. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/phy/phy-lpc18xx-usb-otg.c | 8 +++- 1 file changed, 7 i

[PATCH] phy: lpc18xx-usb-otg: error handling in lpc18xx_usb_otg_phy_power_on()

2018-02-22 Thread Alexey Khoroshilov
If regmap_update_bits() fails in lpc18xx_usb_otg_phy_power_on(), lpc->clk is left enabled. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/phy/phy-lpc18xx-usb-otg.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) d

[PATCH] tun: fix mismatch in mutex lock-unlock in tun_get_user()

2018-02-16 Thread Alexey Khoroshilov
There is a single error path where tfile->napi_mutex is left unlocked. It can lead to a deadlock. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/net/tun.c | 4 1 file changed, 4 insertions(+) d

[PATCH] tun: fix mismatch in mutex lock-unlock in tun_get_user()

2018-02-16 Thread Alexey Khoroshilov
There is a single error path where tfile->napi_mutex is left unlocked. It can lead to a deadlock. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/net/tun.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/tun.

[PATCH v2] watchdog: asm9260_wdt: fix error handling in asm9260_wdt_probe()

2018-02-10 Thread Alexey Khoroshilov
If devm_reset_control_get_exclusive() fails, asm9260_wdt_probe() returns immediately. But clks has been already enabled at that point, so it is required to disable them or to move the code around. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov

[PATCH v2] watchdog: asm9260_wdt: fix error handling in asm9260_wdt_probe()

2018-02-10 Thread Alexey Khoroshilov
If devm_reset_control_get_exclusive() fails, asm9260_wdt_probe() returns immediately. But clks has been already enabled at that point, so it is required to disable them or to move the code around. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov

[PATCH v4 3/3] mtd: nand: vf610: check mtd_device_register() return code

2018-02-09 Thread Alexey Khoroshilov
vf610_nfc_probe() misses error handling of mtd_device_register(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/mtd/nand/vf610_nfc.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff

[PATCH v4 2/3] mtd: nand: vf610: improve readability of error label

2018-02-09 Thread Alexey Khoroshilov
Use clearer error labels as Boris Brezillon suggested. Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/mtd/nand/vf610_nfc.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/mtd/nand/vf610_nfc.c b/drivers/mtd/nand/vf610

[PATCH v4 3/3] mtd: nand: vf610: check mtd_device_register() return code

2018-02-09 Thread Alexey Khoroshilov
vf610_nfc_probe() misses error handling of mtd_device_register(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/mtd/nand/vf610_nfc.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand

[PATCH v4 2/3] mtd: nand: vf610: improve readability of error label

2018-02-09 Thread Alexey Khoroshilov
Use clearer error labels as Boris Brezillon suggested. Signed-off-by: Alexey Khoroshilov --- drivers/mtd/nand/vf610_nfc.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/mtd/nand/vf610_nfc.c b/drivers/mtd/nand/vf610_nfc.c index c4568372c3e3

[PATCH v4 1/3] mtd: nand: vf610: remove the unnecessary of_node_put()

2018-02-09 Thread Alexey Khoroshilov
Calling of_node_put() in vf610_nfc_probe() is wrong because nothing in this code retains a reference to the DT node. Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/mtd/nand/vf610_nfc.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff

[PATCH v4 1/3] mtd: nand: vf610: remove the unnecessary of_node_put()

2018-02-09 Thread Alexey Khoroshilov
Calling of_node_put() in vf610_nfc_probe() is wrong because nothing in this code retains a reference to the DT node. Signed-off-by: Alexey Khoroshilov --- drivers/mtd/nand/vf610_nfc.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/mtd/nand

[PATCH v4 0/3] mtd: nand: vf610: fix error handling in vf610_nfc_probe()

2018-02-09 Thread Alexey Khoroshilov
patches. Alexey Khoroshilov (3): mtd: nand: vf610: remove the unnecessary of_node_put() mtd: nand: vf610: improve readability of error label mtd: nand: vf610: check mtd_device_register() return code drivers/mtd/nand/vf610_nfc.c | 29 - 1 file changed, 16 insertions

[PATCH v4 0/3] mtd: nand: vf610: fix error handling in vf610_nfc_probe()

2018-02-09 Thread Alexey Khoroshilov
patches. Alexey Khoroshilov (3): mtd: nand: vf610: remove the unnecessary of_node_put() mtd: nand: vf610: improve readability of error label mtd: nand: vf610: check mtd_device_register() return code drivers/mtd/nand/vf610_nfc.c | 29 - 1 file changed, 16 insertions

[PATCH] watchdog: asm9260_wdt: fix error handling in asm9260_wdt_probe()

2018-02-09 Thread Alexey Khoroshilov
If devm_reset_control_get_exclusive() fails, asm9260_wdt_probe() returns immediately. But clks has been already enabled at that point, so it is required to disable them. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras

  1   2   3   4   5   6   7   8   9   >