linux/drivers/staging
Javier Carrasco 7d4fb115fb staging: vchiq_arm: Fix missing refcount decrement in error path for fw_node
commit 22a3703af1 upstream.

An error path was introduced without including the required call to
of_node_put() to decrement the node's refcount and avoid leaking memory.
If the call to kzalloc() for 'mgmt' fails, the probe returns without
decrementing the refcount.

Use the automatic cleanup facility to fix the bug and protect the code
against new error paths where the call to of_node_put() might be missing
again.

Cc: stable@vger.kernel.org
Fixes: 1c9e16b731 ("staging: vc04_services: vchiq_arm: Split driver static and runtime data")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20241014-vchiq_arm-of_node_put-v2-2-cafe0a4c2666@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2024-12-05 14:03:01 +01:00
..
axis-fifo staging: axis-fifo: Fix indentation 2024-04-09 17:44:54 +02:00
fbtft staging: fbtft: Use backlight power constants 2024-08-13 11:26:12 +02:00
fieldbus driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
gdm724x staging: gdm724x: constantify the struct device_type usage 2024-02-17 17:30:35 +01:00
greybus Revert "staging: greybus: Fix capitalization and punctuation inconsistencies" 2024-09-11 15:56:26 +02:00
iio staging: iio: frequency: ad9832: fix division by zero in ad9832_calc_freqreg() 2024-10-24 18:30:47 +01:00
media media: atomisp: Add check for rgby_data memory allocation failure 2024-12-05 14:01:34 +01:00
most staging: most: video: Fixed minor capitalization and grammatical issues 2024-07-30 09:20:26 +02:00
nvec staging: nvec: Use IRQF_NO_AUTOEN flag in request_irq() 2024-09-13 07:30:23 +02:00
octeon netdev_features: convert NETIF_F_LLTX to dev->lltx 2024-09-03 11:36:43 +02:00
olpc_dcon staging: olpc_dcon: Use backlight power constants 2024-08-13 11:26:13 +02:00
rtl8192e move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
rtl8712 staging: rtl8712: remove unused drvinfo_sz from update_recvframe_attrib 2024-09-13 07:31:55 +02:00
rtl8723bs move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
rts5208 Staging driver changes for 6.10-rc1 2024-05-22 12:11:48 -07:00
sm750fb video/nomodeset: Select nomodeset= parameter with CONFIG_VIDEO 2024-01-23 10:11:38 +01:00
vc04_services staging: vchiq_arm: Fix missing refcount decrement in error path for fw_node 2024-12-05 14:03:01 +01:00
vme_user staging: vme_user: changed geoid data type from int to u32 2024-09-05 16:45:01 +02:00
vt6655 staging: vt6655: Rename variable apTD1Rings 2024-09-13 07:32:50 +02:00
vt6656 Staging driver updates for 6.11-rc1 2024-07-19 15:46:29 -07:00
Kconfig staging: ks7010: Remove unused driver 2024-07-30 09:21:00 +02:00
Makefile staging: ks7010: Remove unused driver 2024-07-30 09:21:00 +02:00