CyberRota Analysis
AI-GeneratedThe vulnerability affects the Linux kernel's handling of device registration in the sm501 driver, where a reference leak occurs if the `platform_device_register()` function fails after initializing the device. This can lead to resource exhaustion over time, potentially impacting system stability. Linux system administrators and developers working with the affected kernel versions should prioritize addressing this issue to prevent potential performance degradation.
Original NVD Description
In the Linux kernel, the following vulnerability has been resolved: mfd: sm501: Fix reference leak on failed device registration When platform_device_register() fails in sm501_register_device(), the embedded struct device in pdev has already been initialized by device_initialize(), but the failure path only reports the error and returns without dropping the device reference for the current platform device: sm501_register_device() -> platform_device_register(pdev) -> device_initialize(&pdev->dev) -> setup_pdev_dma_masks(pdev) -> platform_device_add(pdev) This leads to a reference leak when platform_device_register() fails. Fix this by calling platform_device_put() before returning the error. The issue was identified by a static analysis tool I developed and confirmed by manual review.