summaryrefslogtreecommitdiff
path: root/drivers/staging
AgeCommit message (Collapse)Author
9 daysReplace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c ↵Uwe Kleine-König (The Capable Hub)
files) Replace the #include of <linux/mod_devicetable.h> by the more specific <linux/device-id/*.h> where applicable. For most cases the include can be dropped completely, only a few drivers need one or two headers added. Acked-by: Danilo Krummrich <dakr@kernel.org> Acked-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/1a3f2007c5c5dcf555c09a4035ce3ae8ef1b6c49.1782808461.git.u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
2026-06-22Merge tag 'staging-7.2-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver updates from Greg KH: "Here is the big set of staging driver updates for 7.2-rc1. Nothing major in here, just constant grind of tiny cleanups and coding style fixes and wrapper removals. Overall more code was removed than added, always a nice sign that things are progressing forward. Changes outside of drivers/staging/ was due to the octeon driver changes, which for some reason also lives partially in the mips subsystem, someday that all will be untangled and cleaned up, or just removed entirely, it's hard to tell which is going to be its fate. Other than octeon driver cleanups, in here are the usual: - rtl8723bs driver reworking and cleanups, being the bulk of this merge window given all of the issues and wrappers involved in that beast of a driver - most driver cleanups - sm750fb driver cleanups (which might be done, as this really should be moved to the drm layer one of these days...) - other tiny staging driver cleanups and fixes All of these have been in linux-next for many weeks with no reported issues" * tag 'staging-7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (199 commits) staging: most: video: avoid double free on video register failure staging: sm750: rename CamelCase variable Bpp to bpp staging: rtl8723bs: delete superfluous switch statement staging: sm750fb: Mark g_noaccel, g_nomtrr and g_dualview as __ro_after_init staging: rtl8723bs: propagate errno through hal xmit path staging: rtl8723bs: propagate errno through xmit enqueue path staging: rtl8723bs: convert rtw_xmit_classifier to return errno staging: rtl8723bs: make rtw_xmit_classifier static staging: rtl8723bs: simplify rtw_xmit_classifier control flow staging: rtl8723bs: make _rtw_enqueue_cmd return 0 on success staging: rtl8723bs: simplify rtw_enqueue_cmd control flow staging: rtl8723bs: make _rtw_enqueue_cmd static staging: rtl8723bs: simplify _rtw_enqueue_cmd control flow staging: rtl8723bs: fix multiple blank lines in more hal/ files staging: rtl8723bs: remove unused TXDESC_64_BYTES code staging: rtl8723bs: remove unused DBG_XMIT_BUF and DBG_XMIT_BUF_EXT code staging: rtl8723bs: fix multiple blank lines in hal/Hal* files staging: rtl8723bs: fix multiple blank lines in hal/ files staging: rtl8723bs: rtw_mlme: add blank line for readability staging: rtl8723bs: rtw_mlme: wrap rtw_sitesurvey_cmd condition ...
2026-06-22Merge tag 'char-misc-7.2-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull misc driver updates from Greg KH: "Here is the big set of char, misc, iio, fpga, and other small driver subsystems changes for 7.2-rc1. Lots of little stuff in here, the majority being of course the IIO driver updates, as a list they are: - IIO driver updates and additions - GPIB driver bugfixes and cleanups - Android binder driver updates (rust and C version) - counter driver updates - MHI driver updates - mei driver updates - w1 driver updates - interconnect driver updates - Comedi driver fixes and updates - some obsolete char drivers removed (applicom and dtlk) - hwtracing driver updates - other tiny driver updates All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (406 commits) w1: ds2482: Use named initializers for arrays of i2c_device_data firmware: stratix10-svc: Add support to query Arm Trusted Firmware (ATF) version firmware: stratix10-rsu: avoid blocking reboot_image sysfs when busy coresight: ultrasoc-smb: Fix OOB write in smb_sync_perf_buffer() iio: adc: nxp-sar-adc: harden buffer ISR against per-channel read failure iio: chemical: scd30: Replace manual locking with RAII locking iio: light: tsl2591: remove unneeded tsl2591_compatible_als_persist_cycle() iio: dac: ad5686: create bus ops struct iio: dac: ad5686: cleanup doc header of local structs iio: dac: ad5686: add control_sync() for single-channel devices iio: dac: ad5686: add helpers to handle powerdown masks iio: dac: ad5686: add of_match table to the spi driver iio: dac: ad5686: drop enum id iio: dac: ad5686: remove redundant register definition iio: dac: ad5686: refactor include headers iio: adc: ad4080: fix AD4880 chip ID iio: light: veml3328: add support for new device dt-bindings: iio: light: veml6030: add veml3328 fpga: microchip-spi: fix zero header_size OOB read in mpf_ops_parse_header() fpga: dfl-afu: validate DMA mapping length in afu_dma_map_region() ...
2026-06-18Merge tag 'media/v7.2-1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - v4l2: - core: fix subdev sensor ownership - subdev: Allow accessing routes with STREAMS client capability - ctrls: Add validation for HEVC active reference counts and background detection control - common: Add YUV24 format info and has_alpha helper - vb2: Change vb2_read() and vb2_write() return types to ssize_t - i2c: cvs: Add driver of Intel Computer Vision Sensing Controller(CVS) - atmel-isc: remove deprecated driver - cec: Add CEC Latency Indication Protocol (LIP) support - imon: Add iMON VFD HID OEM v1.2 key mappings - AVMatrix: new HWS capture driver - isp4: new AMD capture driver - qcom: - iris: Add hierarchical coding, B-frame, and Long-Term Reference support for encoder - camss: Add SM6350 platform support - venus: Add SM6115 platform support - chips-media: wave5: Add support for Packed YUV422, CBP profile, and background detection - csi2rx: Add multistream support and 32 dma chans - Several cleanups and fixes * tag 'media/v7.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (394 commits) media: v4l2-fwnode: Fix subdev owner overwritten in v4l2_async_register_subdev_sensor() media: qcom: iris: vdec: allow GEN2 decoding into 10bit format media: qcom: iris: vdec: update find_format to handle 8bit and 10bit formats media: qcom: iris: vdec: update size and stride calculations for 10bit formats media: qcom: iris: gen2: add support for 10bit decoding media: qcom: iris: add QC10C & P010 buffer size calculations media: qcom: iris: add helpers for 8bit and 10bit formats media: qcom: iris: Fix FPS calculation and VPP FW overhead media: qcom: camss: vfe-340: Support for PIX client media: qcom: camss: vfe-340: Proper client handling media: qcom: camss: csid-340: Enable PIX interface routing media: qcom: camss: csid-340: Add port-to-interface mapping media: qcom: camss: csid-340: Switch to generic CSID_CFG/CTRL registers media: iris: Initialize HFI ops after firmware load in core init media: iris: drop struct iris_fmt media: iris: Add platform data for X1P42100 media: iris: Add hardware power on/off ops for X1P42100 media: iris: optimize COMV buffer allocation for VPU3x and VPU4x media: iris: add FPS calculation and VPP FW overhead in frequency formula media: qcom: iris: Simplify COMV size calculation ...
2026-06-16Merge tag 'spi-v7.2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "This has been quite a busy release, mainly due to the subsystem wide work Johan Hovold has done to modernise resource allocation for the subsystem on probe, the subsystem did some very clever allocation management pre devm which didn't quite mesh comfortably with managed allocations and made it far too easy to introduce error handling and removal bugs. - Cleanup and simplification of controller struct allocation, moving everything over to devm and making the devm APIs more robust, from Johan Hovold - Support for spi-mem devices that don't assert chip select and support for a secondary read command for memory mapped flashes, some commits for this are shared with mtd. - Support for SpacemiT K1" * tag 'spi-v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (118 commits) spi: Fix mismatched DT property access types spi: xilinx: use FIFO occupancy register to determine buffer size spi: spi-mem: Fix spi_controller_mem_ops kdoc spi: xilinx: let transfers timeout in case of no IRQ spi: dt-bindings: nuvoton,npcm750-fiu: Convert to DT schema spi: meson-spifc: fix runtime PM leak on remove spi: Use named initializers for platform_device_id arrays spi: rzv2h-rspi: Add suspend/resume support spi: dw-pci: remove redundant pci_free_irq_vectors() calls spi: ep93xx: fix double-free of zeropage on DMA setup failure spi: cadence-xspi: Revert COMPILE_TEST support spi: cadence-xspi: Support 32bit and 64bit slave dma interface spi: tegra210-quad: Allocate DMA memory for DMA engine spi: imx: replace dmaengine_terminate_all() with dmaengine_terminate_sync() spi: fsl-lpspi: terminate the RX channel on TX prepare failure path spi: fsl-lpspi: replace dmaengine_terminate_all() with dmaengine_terminate_sync() spi: atmel: fix DMA channel and bounce buffer leaks spi: omap2-mcspi: Use of_device_get_match_data() spi: Use named initializers for arrays of i2c_device_data spi: aspeed: Replace VLA parameter with flat pointer in calibration helper ...
2026-06-16Merge tag 'gpio-updates-for-v7.2-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio updates from Bartosz Golaszewski: "There's one new driver, one legacy driver removed, a kunit test-suite for the GPIO core, support for new models in existing drivers and a slew of various changes in many places though I can't think of anything controversial that would stand out - it's been a relatively calm cycle. GPIO core: - Add an initial set of kunit test cases for the GPIO subsystem - Use the devres owner as the GPIO chip's parent in absence of any other parent - Fix const-correctness of GPIO chip SRCU guards - Provide new GPIO consumer interfaces: gpiod_is_single_ended() and fwnode_gpiod_get() - Quarantine all legacy GPIO APIs in linux/gpio/legacy.h - Use __ro_after_init where applicable New drivers: - Add driver for the GPIO controller on Waveshare DSI TOUCH panels Removed drivers: - Remove the obsolete ts5500 GPIO driver Driver updates: - Modernize gpio-timberdale: remove platform data support and use generic device property accessors - Extend test build coverage by enabling COMPILE_TEST for more GPIO drivers - Add some missing dependencies in Kconfig - Add support for sparse fixed direction to gpio-regmap - Remove dead code from gpio-nomadik - use BIT() in gpio-mxc - use bitmap_complement() in gpio-xilinx and gpio-pca953x - Use more appropriate printing functions where applicable - Use named initializers for platform_device_id and i2c_device_id arrays - Convert gpio-altera to using the generic GPIO chip helper library - Add support for new models to gpio-dwapb, gpio-zynq, gpio-usbio and gpio-tegra186 - Unify the naming convention for Qualcomm in GPIO drivers - Fix interrupt bank mapping to GPIO chips in gpio-mt7621 - Add support for the lines-initial-states property to gpio-74x164 - Switch to using dynamic GPIO base in gpio-ixp4xx - Move the handling of an OF quirk from ASoC to gpiolib-of.c where other such quirks live - Use handle_bad_irq() in gpio-ep93xx - Some other minor tweaks and refactorings Devicetree bindings: - Document the Waveshare GPIO controller for DSI TOUCH panels - Document new models: Tegra238 in gpio-tegra186 and EIO GPIO in gpio-zynq - Add new properties for gpio-dwapb and fairchild,74hc595 - Fix whitespace issues - Sort compatibles alphabetically in gpio-zynq Documentation: - Fix kerneldoc warnings in gpio-realtek-otto Misc: - Attach software nodes representing GPIO chips to the actual struct device objects associated with them in some legacy platforms enabling real firmware node lookup instead of string matching - Drop unneeded dependencies on OF_GPIO from bus and staging drivers" * tag 'gpio-updates-for-v7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (62 commits) gpio: nomadik: remove dead DB8540 code from <gpio/gpio-nomadik.h> gpio: mt7621: fix interrupt banks mapping on gpio chips bus: ts-nbus: drop unneeded dependency on OF_GPIO staging: media: max96712: drop unneeded dependency on OF_GPIO gpiolib: Replace strcpy() with memcpy() gpio: remove obsolete UAF FIXMEs from lookup paths gpio: core: fix const-correctness of gpio_chip_guard gpio: mxc: use BIT() macro gpio: realtek-otto: fix kernel-doc warnings gpio: max77620: Unify usage of space and comma in platform_device_id array gpio: Use named initializers for platform_device_id arrays gpio: cros-ec: Drop unused assignment of platform_device_id driver data ARM: omap1: enable real software node lookup of GPIOs on Nokia 770 ARM: omap1: use platform_device_register_full() for GPIO devices on OMAP 16xx ARM: omap1: drop unused variable from omap16xx_gpio_init() gpio: gpiolib: use seq_puts() for plain strings gpio: ts5500: remove obsolete driver gpio: add kunit test cases for the GPIO subsystem kunit: provide kunit_platform_device_unregister() kunit: provide kunit_platform_device_register_full() ...
2026-06-12Merge tag 'staging-7.1-final' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver fixes from Greg KH: "Here are two small bugfixes for a staging driver to fix a much-reported issue. The fixes are for the rtl8723bs driver and it's something that many scanning tools keep tripping over in convoluted ways (and seems to be able to be triggered by network traffic) These fixes have been in linux-next for many weeks with no reported issues, sorry for the delay in getting them to you" * tag 'staging-7.1-final' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: rtl8723bs: rtw_mlme: add bounds checks before ie_length subtraction staging: rtl8723bs: fix buffer over-read in rtw_update_protection
2026-06-08staging: media: max96712: drop unneeded dependency on OF_GPIOBartosz Golaszewski
OF_GPIO is selected automatically on all OF systems. Any symbols it controls also provide stubs and are private to GPIOLIB anyway so there's really no reason to select it explicitly. Link: https://patch.msgid.link/20260506082211.5624-1-bartosz.golaszewski@oss.qualcomm.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-06-02Merge tag 'v7.1-rc6' into workJonathan Cameron
Linux 7.1-rc6
2026-05-31staging: iio: Use named initializers for struct i2c_device_idUwe Kleine-König (The Capable Hub)
While being less compact, using named initializers allows to more easily see which members of the structs are assigned which value without having to lookup the declaration of the struct. And it's also more robust against changes to the struct definition. This patch doesn't modify the compiled arrays, only their representation in source form benefits. The former was confirmed with x86 and arm64 builds. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Reviewed-by: Stepan Ionichev <sozdayvek@gmail.com> Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31staging: iio: addac: adt7316: document SPI interface switching sequenceHungyu Lin
The device powers up in I2C mode. Switching to SPI mode requires sending a sequence of SPI writes as described in the datasheet. During this sequence, the device may still be in I2C mode, so SPI transactions may not be recognized and can fail. Such errors are therefore ignored. Add a comment to clarify this behavior. Datasheet: https://www.analog.com/en/products/adt7316.html Reviewed-by: Maxwell Doose <m32285159@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31staging: iio: ad9834: fix chip name typo in commentsAngus Gardner
Two comments incorrectly refer to 'AD9843' instead of 'AD9834'. Fix the copy-paste typo. Signed-off-by: Angus Gardner <angusg778@gmail.com> Reviewed-by: Maxwell Doose <m32285159@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31staging: iio: ad9834: use dev_err_probe() in probe functionAngus Gardner
Replace open-coded dev_err() + return sequences with dev_err_probe(), which is the preferred pattern for probe error paths as it handles deferred probing correctly and reduces boilerplate. Convert all three remaining instances in ad9834_probe(): - master clock enable failure - device init SPI sync failure The avdd regulator path already used dev_err_probe(). Signed-off-by: Angus Gardner <angusg778@gmail.com> Reviewed-by: Maxwell Doose <m32285159@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31staging: iio: ad9834: simplify -ENOMEM return in probeAngus Gardner
devm_iio_device_alloc() failure returns -ENOMEM via a local variable unnecessarily. Return -ENOMEM directly instead. Signed-off-by: Angus Gardner <angusg778@gmail.com> Reviewed-by: Maxwell Doose <m32285159@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: frequency: ad9832: simplify bitwise mathJoshua Crofts
Refactor the ad9832_calc_freqreg by removing the redundant u64 casts and 1L bitwise left shift and replacing the multiplication by a bit shift, as multiplying integers by a power of two is identical to a bitwise left shift. Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com> Reviewed-by: Nuno Sá <nuno.sa@analog.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-27media: staging: imx: remove unnecessary out-of-memory error messageShyam Sunder Reddy Padira
Remove dev_err() call after dma_alloc_coherent() failure. checkpatch.pl reports this as an unnecessary out-of-memory message because failure is already conveyed by returning -ENOMEM, and the current message does not provide additional useful debugging information. Signed-off-by: Shyam Sunder Reddy Padira <shyamsunderreddypadira@gmail.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-05-27media: staging: imx-csi: use media_pad_is_streaming helperMichael Tretter
The media_pad_is_streaming() helper is explicitly intended to check whether a pad has been started with media_pipeline_start(). Use it instead of relying on the implicit assumption that a pad with a pipeline is streaming. Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Reviewed-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-05-27media: staging: imx-csi: explicitly start media pipeline on pad 0Michael Tretter
entity->pads is an array that contains all the pads of an entity. Calling __media_pipeline_start() or __media_pipeline_stop() on the pads, implicitly starts the pipeline with the first pad in this array as origin. Explicitly use the first pad to start the pipeline to make this more obvious to the reader. Reviewed-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-05-27media: staging: imx-csi: move media_pipeline to video deviceMichael Tretter
The imx-media driver has a single imx_media_device. Attaching the media_pipeline to the imx_media_device prevents the execution of multiple media pipelines on the device. This should be possible as long as the media_pipelines don't use the same pads or pads that be configured while the other media pipeline is streaming. Move the media_pipeline to the imx_media_video_dev to be able to construct media pipelines per imx capture device. If different media pipelines in the media device conflict, the validation will fail. Thus, the pipeline will fail to start and signal an error to user space. Reviewed-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-05-21spi: fix controller registration API inconsistencyJohan Hovold
The SPI controller API is asymmetric in that a controller is allocated and registered in two step, while it is freed as part of deregistration. [1] This is especially unfortunate as any driver data is freed along with the controller, something which has lead to use-after-free bugs during deregistration when drivers tear down resources after deregistering the controller (or tear down resources that may still be in use before deregistering the controller in an attempt to work around the API). To reduce the risk of such bugs being introduced a device managed allocation interface was added, but this arguably made things even less consistent as now whether the controller gets freed as part of deregistration depends on how it was allocated. [2][3] With most drivers converted to use managed allocation in preparation for fixing the API, the remaining 16 drivers can be converted in one tree-wide change. Ten of those drivers use the bitbang interface and can be converted by simply removing the extra reference already taken by spi_bitbang_start() (and updating the two bitbang drivers that use managed allocation). [4] Fix the API inconsistency by no longer dropping a reference when deregistering non-devres allocated controllers. [1] 68b892f1fdc4 ("spi: document odd controller reference handling") [2] 5e844cc37a5c ("spi: Introduce device-managed SPI controller allocation") [3] 3f174274d224 ("spi: fix misleading controller deregistration kernel-doc") [4] 702a4879ec33 ("spi: bitbang: Let spi_bitbang_start() take a reference to master") Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://patch.msgid.link/20260521073816.766596-1-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-21staging: rtl8723bs: rtw_mlme: add bounds checks before ie_length subtractionSalman Alghamdi
Add guards to ensure ie_length is large enough before subtracting fixed IE offsets to prevent unsigned integer underflow. Fixes: 2038fe84b8bd ("staging: rtl8723bs: fix spacing around operators") Fixes: d3fcee1b78a5 ("staging: rtl8723bs: fix camel case in struct wlan_bssid_ex") Closes: https://lore.kernel.org/linux-staging/DI2H39EAAFBZ.3KI5NWN02AQ2S@linux.dev/ Cc: stable <stable@kernel.org> Signed-off-by: Salman Alghamdi <me@cipherat.com> Reviewed-by: Luka Gejak <luka.gejak@linux.dev> Link: https://patch.msgid.link/20260513203455.31792-1-me@cipherat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: most: video: avoid double free on video register failureGuangshuo Li
comp_register_videodev() allocates a video_device with video_device_alloc() and releases it if video_register_device() fails. This can double free the video_device when __video_register_device() reaches device_register() and that call fails: video_register_device() -> __video_register_device() -> device_register() fails -> put_device(&vdev->dev) -> v4l2_device_release() -> vdev->release(vdev) -> video_device_release(vdev) comp_register_videodev() -> video_device_release(mdev->vdev) Use video_device_release_empty() while registering the device so that registration failure paths do not free mdev->vdev through vdev->release(). comp_register_videodev() then releases mdev->vdev exactly once on failure. Restore video_device_release() after successful registration so the registered device keeps its normal lifetime handling. This issue was found by a static analysis tool I am developing. Fixes: eab231c0398a ("staging: most: v4l2-aim: remove unnecessary label err_vbi_dev") Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com> Link: https://patch.msgid.link/20260517111218.945796-1-lgs201920130244@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: sm750: rename CamelCase variable Bpp to bppRupesh Majhi
Rename the CamelCase variable 'Bpp' to 'bpp' in both the header and implementation files to comply with Linux kernel coding style. Issue found by checkpatch. Signed-off-by: Rupesh Majhi <zoone.rupert@gmail.com> Link: https://patch.msgid.link/20260517131918.197943-1-zoone.rupert@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: rtl8723bs: delete superfluous switch statementJennifer Guo
This switch statement doesn't do anything in all of its branches. As such we can clean it up, and only keep the assignment in the else block. Signed-off-by: Jennifer Guo <guojy.bj@gmail.com> Link: https://patch.msgid.link/20260517044330.8517-1-guojy.bj@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: sm750fb: Mark g_noaccel, g_nomtrr and g_dualview as __ro_after_initLen Bao
The 'g_noaccel', 'g_nomtrr' and 'g_dualview' variables are initialized only during the init phase in the 'lynxfb_setup' function and never changed. So, mark them as __ro_after_init. Signed-off-by: Len Bao <len.bao@gmx.us> Link: https://patch.msgid.link/20260516142326.36018-1-len.bao@gmx.us Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: rtl8723bs: propagate errno through hal xmit pathHungyu Lin
Propagate errno values from rtl8723bs_hal_xmitframe_enqueue() through rtw_hal_xmitframe_enqueue() by returning the error code directly. Update rtw_hal_xmit() to explicitly map the boolean return value of rtl8723bs_hal_xmit() to _SUCCESS/_FAIL, clarifying the return semantics at the HAL boundary. None of the callers of rtw_hal_xmitframe_enqueue() check the return value, so they do not need to be updated. This change does not affect runtime behavior. Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Link: https://patch.msgid.link/20260514100708.25031-6-dennylin0707@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: rtl8723bs: propagate errno through xmit enqueue pathHungyu Lin
Propagate errno values from rtw_xmit_classifier() through rtw_xmitframe_enqueue(), and update the local enqueue caller to check for non-zero return values. Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Link: https://patch.msgid.link/20260514100708.25031-5-dennylin0707@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: rtl8723bs: convert rtw_xmit_classifier to return errnoHungyu Lin
Convert rtw_xmit_classifier() to return 0 on success and negative error codes on failure. Update the caller to check for non-zero return values and preserve the existing _FAIL/_SUCCESS semantics. Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Link: https://patch.msgid.link/20260514100708.25031-4-dennylin0707@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: rtl8723bs: make rtw_xmit_classifier staticHungyu Lin
The rtw_xmit_classifier() function is only used within rtw_xmit.c. Move it above its caller and make it static to limit its scope. Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Link: https://patch.msgid.link/20260514100708.25031-3-dennylin0707@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: rtl8723bs: simplify rtw_xmit_classifier control flowHungyu Lin
Simplify rtw_xmit_classifier() by removing the exit label and using direct returns for error handling. No functional change. Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Link: https://patch.msgid.link/20260514100708.25031-2-dennylin0707@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: rtl8723bs: make _rtw_enqueue_cmd return 0 on successHungyu Lin
Convert the private helper _rtw_enqueue_cmd() to return 0 on success instead of the legacy _SUCCESS value. Keep rtw_enqueue_cmd() translating the result back to the existing return convention for now. No functional change intended. Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Link: https://patch.msgid.link/20260513213719.12246-5-dennylin0707@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: rtl8723bs: simplify rtw_enqueue_cmd control flowHungyu Lin
Replace the goto exit pattern with direct returns to simplify the control flow and improve readability. No functional change intended. Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Link: https://patch.msgid.link/20260513213719.12246-4-dennylin0707@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: rtl8723bs: make _rtw_enqueue_cmd staticHungyu Lin
The function _rtw_enqueue_cmd() is only used within rtw_cmd.c, so make it static and remove the unnecessary declaration from the header file. Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Link: https://patch.msgid.link/20260513213719.12246-3-dennylin0707@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: rtl8723bs: simplify _rtw_enqueue_cmd control flowHungyu Lin
Replace the goto exit pattern with a direct return to simplify the control flow and improve readability. No functional change intended. Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Link: https://patch.msgid.link/20260513213719.12246-2-dennylin0707@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: rtl8723bs: fix multiple blank lines in more hal/ filesJennifer Guo
Remove multiple consecutive blank lines in more hal/ files. This fixes the following checkpatch.pl check: CHECK: Please don't use multiple blank lines Signed-off-by: Jennifer Guo <guojy.bj@gmail.com> Link: https://patch.msgid.link/20260515175140.7439-1-guojy.bj@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: rtl8723bs: remove unused TXDESC_64_BYTES codeAndrei Khomenkov
Remove the TXDESC_64_BYTES code since it is not used as the macro is not defined anywhere. Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org> Link: https://patch.msgid.link/20260515151253.8106-3-khomenkov@mailbox.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: rtl8723bs: remove unused DBG_XMIT_BUF and DBG_XMIT_BUF_EXT codeAndrei Khomenkov
Remove the DBG_XMIT_BUF and DBG_XMIT_BUF_EXT code since it is not used as the macros are not defined anywhere. Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org> Link: https://patch.msgid.link/20260515151253.8106-2-khomenkov@mailbox.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: rtl8723bs: fix multiple blank lines in hal/Hal* filesJennifer Guo
Remove multiple consecutive blank lines in hal/Hal* source and header files. This fixes the following checkpatch.pl check: CHECK: Please don't use multiple blank lines Signed-off-by: Jennifer Guo <guojy.bj@gmail.com> Link: https://patch.msgid.link/20260514180642.4608-1-guojy.bj@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: rtl8723bs: fix multiple blank lines in hal/ filesJennifer Guo
Remove multiple consecutive blank lines in hal/hal_* and hal/sdio_* files. This fixes the following checkpatch.pl check: CHECK: Please don't use multiple blank lines Signed-off-by: Jennifer Guo <guojy.bj@gmail.com> Link: https://patch.msgid.link/20260513212747.50900-1-guojy.bj@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: rtl8723bs: rtw_mlme: add blank line for readabilitySalman Alghamdi
Add a blank line between the WIFI_UNDER_WPS block and the wifi_spec block to improve readability. Signed-off-by: Salman Alghamdi <me@cipherat.com> Reviewed-by: Luka Gejak <luka.gejak@linux.dev> Link: https://patch.msgid.link/20260513203611.31872-7-me@cipherat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: rtl8723bs: rtw_mlme: wrap rtw_sitesurvey_cmd conditionSalman Alghamdi
Inline rtw_sitesurvey_cmd() directly in the if condition to reduce line length. Signed-off-by: Salman Alghamdi <me@cipherat.com> Reviewed-by: Luka Gejak <luka.gejak@linux.dev> Link: https://patch.msgid.link/20260513203611.31872-3-me@cipherat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: sm750fb: remove double space in assignmentAhmet Sezgin Duran
Remove extra space after `=` in assignment of `reg` variable. Signed-off-by: Ahmet Sezgin Duran <ahmet@sezginduran.net> Link: https://patch.msgid.link/20260512164124.188210-5-ahmet@sezginduran.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: sm750fb: remove unnecessary initializationAhmet Sezgin Duran
Remove `data = 0` initialization since the variable is reset each time in the for loop. Signed-off-by: Ahmet Sezgin Duran <ahmet@sezginduran.net> Link: https://patch.msgid.link/20260512164124.188210-4-ahmet@sezginduran.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: sm750fb: use early returns in frequency checksAhmet Sezgin Duran
Invert the frequency validation conditions and use early returns to reduce nesting and improve readability. No functional changes. Signed-off-by: Ahmet Sezgin Duran <ahmet@sezginduran.net> Link: https://patch.msgid.link/20260512164124.188210-3-ahmet@sezginduran.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: sm750fb: remove unused includesAhmet Sezgin Duran
Remove unused header file includes from multiple source files to declutter the include sections. Also remove the unused CONFIG_MTRR include block after verifying that no MTRR interfaces are used by the driver. No functional changes. Signed-off-by: Ahmet Sezgin Duran <ahmet@sezginduran.net> Link: https://patch.msgid.link/20260512164124.188210-2-ahmet@sezginduran.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21media: meson: vdec: Fix memory leak in error path of vdec_openAnand Moon
The vdec_open() function previously jumped directly to err_m2m_release when vdec_init_ctrls() failed, skipping release of the m2m context. This caused a resource leak. Fix it by introducing a proper err_m2m_ctx_release label that calls v4l2_m2m_ctx_release(sess->m2m_ctx) before releasing the m2m device. This was identified via kmemleak: unreferenced object 0xffff0000205d6878 (size 8): comm "v4l_id", pid 5289, jiffies 4294938580 hex dump (first 8 bytes): 40 d2 49 18 00 00 ff ff @.I..... backtrace (crc d3204599): kmemleak_alloc+0xc8/0xf0 __kvmalloc_node_noprof+0x60c/0x850 v4l2_ctrl_handler_init_class+0x1b4/0x2e8 [videodev] vdec_open+0x1f4/0x788 [meson_vdec] v4l2_open+0x144/0x460 [videodev] chrdev_open+0x1ac/0x500 do_dentry_open+0x3f0/0xfe8 vfs_open+0x68/0x320 do_open+0x2d8/0x9a8 path_openat+0x1d0/0x4f0 do_filp_open+0x190/0x380 do_sys_openat2+0xf8/0x1b0 __arm64_sys_openat+0x13c/0x1e8 invoke_syscall+0xdc/0x268 el0_svc_common.constprop.0+0x178/0x258 do_el0_svc+0x4c/0x70 Fixes: 3e7f51bd9607 ("media: meson: add v4l2 m2m video decoder driver") Cc: stable@vger.kernel.org Signed-off-by: Anand Moon <linux.amoon@gmail.com> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-05-21staging: media: meson: fix typo in codec filesMaha Maryam Javaid
Fix spelling mistake: substracted -> subtracted Signed-off-by: Maha Maryam Javaid <mahamaryamjavaid@gmail.com> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-05-21media: cedrus: clean up media device on probe failureMyeonghun Pak
cedrus_probe() initializes the media device before registering the video device, the media controller, and the media device. If any of those later steps fails, probe returns without calling media_device_cleanup(), so the media device internals initialized by media_device_init() are left behind. Add a media-device cleanup label to the probe unwind path and route video registration failures through it as well. Fixes: 50e761516f2b8c ("media: platform: Add Cedrus VPU decoder driver") Cc: stable@vger.kernel.org Reviewed-by: Paul Kocialkowski <paulk@sys-base.io> Co-developed-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Myeonghun Pak <mhun512@gmail.com> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-05-21staging: rtl8723bs: remove READ_AND_CONFIG_MP macroMichael Straube
Remove the READ_AND_CONFIG_MP macro from odm_HWConfig.c and call the ODM_ReadAndConfig_MP_* functions directly to reduce code complexity and improve readability. Signed-off-by: Michael Straube <straube.linux@gmail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Link: https://patch.msgid.link/20260517072802.71149-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-21staging: rtl8723bs: remove unused SysIntrStatus from struct hal_com_dataNikolay Kulikov
This field has not been used anywhere since the driver was added, so remove it to eliminate dead code. Signed-off-by: Nikolay Kulikov <nikolayof23@gmail.com> Link: https://patch.msgid.link/20260512125703.6878-5-nikolayof23@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>