[PATCH] i2c: axxia: enable clock before calling clk_get_rate()

2018-04-30 Thread Tobias Jordan
cd0 ("i2c: axxia: Add I2C driver for AXM55xx") Signed-off-by: Tobias Jordan --- drivers/i2c/busses/i2c-axxia.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/i2c/busses/i2c-axxia.c b/drivers/i2c/busses/i2c-axxia.c index 13f07482ec68..51338c48d193

[PATCH] spi: pxa2xx: check clk_prepare_enable() return value

2018-04-30 Thread Tobias Jordan
clk_prepare_enable() can fail, so its return value should be checked and acted upon. Found by Linux Driver Verification project (linuxtesting.org). Fixes: 3343b7a6d2cd ("spi/pxa2xx: convert to the common clk framework") Signed-off-by: Tobias Jordan --- drivers/spi/spi-pxa

[PATCH v2] i2c: axxia: enable clock before calling clk_get_rate()

2018-04-30 Thread Tobias Jordan
cd0 ("i2c: axxia: Add I2C driver for AXM55xx") Signed-off-by: Tobias Jordan --- v2: first version of the patch ignored that the clock should be disabled in case we bail out later... compile-tested and coccichecked. drivers/i2c/busses/i2c-axxia.c | 26 ++ 1 fil

Re: [PATCH] leds: aw2013: fix leak of device node iterator

2020-09-30 Thread Tobias Jordan
On 2020-09-30 19:10, Pavel Machek wrote: Hi Pavel, > > In the error path of the for_each_available_child_of_node loop in > > aw2013_probe_dt, add missing call to of_node_put to avoid leaking > > the iterator. > > > > Fixes: 59ea3c9faf32 ("leds: add aw2013

[PATCH] drm: of: fix leak of port_node

2020-09-25 Thread Tobias Jordan
, but that missed the leak of the original port_node and also the first error path which was obviously wrong as well. Fix the leak of port_node in the error paths by calling of_node_put on it. Fixes: 6529007522de ("drm: of: Add drm_of_lvds_get_dual_link_pixel_order") Signed-off-by: Tobias

[PATCH] drm: of: fix leak of endpoint

2020-09-25 Thread Tobias Jordan
, but that missed the leak of the original endpoint and also the first error path which was obviously wrong as well. Fix the leak of endpoint in the error path by calling of_node_put on it. Fixes: 6529007522de ("drm: of: Add drm_of_lvds_get_dual_link_pixel_order") Signed-off-by: Tobias Jorda

[PATCH] leds: lp55xx: fix device node iterator memory leaks

2020-09-25 Thread Tobias Jordan
Fix error paths in for_each_child_of_node loops that were missing an of_node_put call. Fixes: 92a81562e695 ("leds: lp55xx: Add multicolor framework support to lp55xx") Signed-off-by: Tobias Jordan --- drivers/leds/leds-lp55xx-common.c | 8 ++-- 1 file changed, 6 insertions(+), 2

[PATCH] leds: tlc591xx: fix leak of device node iterator

2020-09-25 Thread Tobias Jordan
In one of the error paths of the for_each_child_of_node loop in tlc591xx_probe, add missing call to of_node_put. Fixes: 1ab4531ad132 ("leds: tlc591xx: simplify driver by using the managed led API") Signed-off-by: Tobias Jordan --- drivers/leds/leds-tlc591xx.c | 1 + 1 file changed, 1

[PATCH] leds: omnia: fix leak of device node iterator

2020-09-25 Thread Tobias Jordan
In the error path of the for_each_available_child_of_node loop in omnia_leds_probe, add missing call to of_node_put to fix leaking the iterator. Fixes: 089381b27abe ("leds: initial support for Turris Omnia LEDs") Signed-off-by: Tobias Jordan --- drivers/leds/leds-turris-omnia.c | 4 ++

[PATCH] leds: aw2013: fix leak of device node iterator

2020-09-25 Thread Tobias Jordan
In the error path of the for_each_available_child_of_node loop in aw2013_probe_dt, add missing call to of_node_put to avoid leaking the iterator. Fixes: 59ea3c9faf32 ("leds: add aw2013 driver") Signed-off-by: Tobias Jordan --- drivers/leds/leds-aw2013.c | 4 +++- 1 file changed, 3

[PATCH] bus: qcom: ebi2: fix device node iterator leak

2020-09-25 Thread Tobias Jordan
In the for_each_available_child_of_node loop of qcom_ebi2_probe, add a call to of_node_put to avoid leaking the iterator if we bail out. Fixes: 335a12754808 ("bus: qcom: add EBI2 driver") Signed-off-by: Tobias Jordan --- drivers/bus/qcom-ebi2.c | 4 +++- 1 file changed, 3 insert

[PATCH] bus: arm: integrator: fix device node iterator leak

2020-09-25 Thread Tobias Jordan
In the for_each_available_child_of_node loop of integrator_lm_populate, add a call to of_node_put to avoid leaking the iterator if we bail out. Fixes: ccea5e8a5918 ("bus: Add driver for Integrator/AP logic modules") Signed-off-by: Tobias Jordan --- drivers/bus/arm-integrator-lm.c | 1

[PATCH v2] leds: tlc591xx: fix leak of device node iterator

2020-09-25 Thread Tobias Jordan
In one of the error paths of the for_each_child_of_node loop in tlc591xx_probe, add missing call to of_node_put. Fixes: 1ab4531ad132 ("leds: tlc591xx: simplify driver by using the managed led API") Signed-off-by: Tobias Jordan --- v2: rebased to Pavel's for-next branch dr

[PATCH] iio: adc: gyroadc: fix leak of device node iterator

2020-09-26 Thread Tobias Jordan
c53b32329 ("iio: adc: Add Renesas GyroADC driver") Signed-off-by: Tobias Jordan --- drivers/iio/adc/rcar-gyroadc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/iio/adc/rcar-gyroadc.c b/drivers/iio/adc/rcar-gyroadc.c index dcaefc108ff6..3746b0276b80 100644 --- a/driver

[PATCH] iio: temperature: ltc2983: fix leak of device node iterator

2020-09-26 Thread Tobias Jordan
: f110f3188e56 ("iio: temperature: Add support for LTC2983") Signed-off-by: Tobias Jordan --- drivers/iio/temperature/ltc2983.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/iio/temperature/ltc2983.c b/drivers/iio/temperature/ltc2983.c index 55ff28a0f1c7..438e0ee

[PATCH v2] iio: adc: gyroadc: fix leak of device node iterator

2020-09-26 Thread Tobias Jordan
Add missing of_node_put calls when exiting the for_each_child_of_node loop in rcar_gyroadc_parse_subdevs early. Also add goto-exception handling for the error paths in that loop. Fixes: 059c53b32329 ("iio: adc: Add Renesas GyroADC driver") Signed-off-by: Tobias Jordan --- v2:

[PATCH v3] leds: tlc591xx: fix leak of device node iterator

2020-09-26 Thread Tobias Jordan
In one of the error paths of the for_each_child_of_node loop in tlc591xx_probe, add missing call to of_node_put. Fixes: 1ab4531ad132 ("leds: tlc591xx: simplify driver by using the managed led API") Signed-off-by: Tobias Jordan Reviewed-by: Marek BehĂșn --- v3: removed linebreak from

[PATCH] lib/crc32.c: fix trivial typo in preprocessor condition

2020-09-23 Thread Tobias Jordan
#x27;s maybe time to save them some effort. [1]: https://lists.elisa.tech/g/devel/message/1089 Fixes: 46c5801eaf86 ("crc32: bolt on crc32c") Signed-off-by: Tobias Jordan --- Sorry for spamming people in CC:, there doesn't seem to be a designated maintainer for lib/crc*. li

[PATCH] gpu: ipu-v3: pre: fix device node leak in ipu_pre_lookup_by_phandle

2018-02-15 Thread Tobias Jordan
Before returning, call of_node_put() for the device node returned by of_parse_phandle(). Fixes: d2a34232580a ("gpu: ipu-v3: add driver for Prefetch Resolve Engine") Signed-off-by: Tobias Jordan --- drivers/gpu/ipu-v3/ipu-pre.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/d

[PATCH] gpu: ipu-v3: prg: fix device node leak in ipu_prg_lookup_by_phandle

2018-02-15 Thread Tobias Jordan
Before returning, call of_node_put() for the device node returned by of_parse_phandle(). Fixes: ea9c260514c1 ("gpu: ipu-v3: add driver for Prefetch Resolve Gasket") Signed-off-by: Tobias Jordan --- drivers/gpu/ipu-v3/ipu-prg.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/d

[PATCH] remoteproc: qcom: Fix potential device node leaks

2018-02-15 Thread Tobias Jordan
Add missing of_node_put()s at two places for device nodes returned by of_parse_phandle(). Fixes: 051fb70fd4ea ("remoteproc: qcom: Driver for the self-authenticating Hexagon v5") Signed-off-by: Tobias Jordan --- drivers/remoteproc/qcom_q6v5_pil.c | 2 ++ 1 file changed, 2 insertion

[PATCH] i2c: cadence: Fix PM device usage count

2018-02-24 Thread Tobias Jordan
pm_runtime_get_sync() increases the device's usage count even when reporting an error, so add a call to pm_runtime_put_noidle() in the error branch. Fixes: 7fa32329ca03 ("i2c: cadence: Move to sensible power management") Signed-off-by: Tobias Jordan --- This is one of a number

[PATCH] i2c: img-scb: fix PM device usage count

2018-02-24 Thread Tobias Jordan
pm_runtime_get_sync() increases the device's usage count even when reporting an error, so add a call to pm_runtime_put_noidle() in the error branch. Fixes: 93222bd9b966 ("i2c: img-scb: Add runtime PM") Signed-off-by: Tobias Jordan --- This is one of a number of patches for probl

[PATCH] i2c: imx: Fix PM device usage count

2018-02-24 Thread Tobias Jordan
pm_runtime_get_sync() increases the device's usage count even when reporting an error, so add a call to pm_runtime_put_noidle() in the related error branches. Fixes: 588eb93ea49f ("i2c: imx: add runtime pm support to improve the performance") Signed-off-by: Tobias Jordan ---

[PATCH] i2c: imx-lpi2c: Fix PM device usage count

2018-02-24 Thread Tobias Jordan
pm_runtime_get_sync() increases the device's usage count even when reporting an error, so add a call to pm_runtime_put_noidle() in the error branch. Fixes: 13d6eb20fc79 ("i2c: imx-lpi2c: add runtime pm support") Signed-off-by: Tobias Jordan --- This is one of a number of patch

[PATCH] i2c: sprd: Fix PM device usage count

2018-02-24 Thread Tobias Jordan
pm_runtime_get_sync() increases the device's usage count even when reporting an error, so add a call to pm_runtime_put_noidle() in the related error branches. Fixes: 8b9ec0719834 ("i2c: Add Spreadtrum I2C controller driver") Signed-off-by: Tobias Jordan --- This is one of a number

[PATCH] i2c: tegra: Fix PM device usage count

2018-02-24 Thread Tobias Jordan
pm_runtime_get_sync() increases the device's usage count even when reporting an error, so add a call to pm_runtime_put_noidle() in the related error branches. Fixes: 1f50ad2c86cd ("i2c: tegra: Add runtime power-management support") Signed-off-by: Tobias Jordan --- This is one

[PATCH] i2c: xiic: Fix PM device usage count

2018-02-24 Thread Tobias Jordan
pm_runtime_get_sync() increases the device's usage count even when reporting an error, so add a call to pm_runtime_put_noidle() in the error branch. Fixes: 36ecbcab84d0 ("i2c: xiic: Implement power management") Signed-off-by: Tobias Jordan --- This is one of a number of patch

Re: [SIL2review] [PATCH] i2c: img-scb: fix PM device usage count

2018-02-25 Thread Tobias Jordan
Hi! On Sun, 25 Feb 2018 13:20:14 + Nicholas Mc Guire wrote: > the decrement though is conditional: > pm_runtime_put_noidle > -> atomic_add_unless(&dev->power.usage_count, -1, 0); pm_runtime_put_noidle is playing it safe by not decrementing past 0, I think that's a good thing. > Also j

[RFC] spi: sun6i: disable/unprepare clocks on remove

2017-12-06 Thread Tobias Jordan
driver Signed-off-by: Tobias Jordan --- This was found by LDV, and it looks very suspicious to me, but I'm not sure if the fix is that easy. Is suspend() called automatically when the driver is removed? If not, is it correct to unconditionally call suspend(), or should there be a check for t

[PATCH] dmaengine: jz4740: disable/unprepare clk if probe fails

2017-12-06 Thread Tobias Jordan
in error path of jz4740_dma_probe(), call clk_disable_unprepare() to clean up. Found by Linux Driver Verification project (linuxtesting.org). Fixes: 25ce6c35fea0 MIPS: jz4740: Remove custom DMA API Signed-off-by: Tobias Jordan --- drivers/dma/dma-jz4740.c | 4 +++- 1 file changed, 3 insertions

[PATCH] net: mvmdio: disable/unprepare clocks in EPROBE_DEFER case

2017-12-06 Thread Tobias Jordan
add appropriate calls to clk_disable_unprepare() by jumping to out_mdio in case orion_mdio_probe() returns -EPROBE_DEFER. Found by Linux Driver Verification project (linuxtesting.org). Fixes: 3d604da1e954 net: mvmdio: get and enable optional clock Signed-off-by: Tobias Jordan --- drivers/net

[PATCH] spi: sun6i: disable/unprepare clocks on remove

2017-12-07 Thread Tobias Jordan
() is called if needed. Found by Linux Driver Verification project (linuxtesting.org). Fixes: 3558fe900e8af spi: sunxi: Add Allwinner A31 SPI controller driver Signed-off-by: Tobias Jordan --- Found by LDV and discussed as RFC before; compile-tested. drivers/spi/spi-sun6i.c | 2 +- 1 file chang