diff options
author | Yuan Can <[email protected]> | 2022-11-23 06:12:12 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2022-11-23 09:38:50 +0100 |
commit | 1a6ec673fb627c26e2267ca0a03849f91dbd9b40 (patch) | |
tree | 12fe0bf9abb0241ad726ce17a237a9eecf08f302 /drivers/gpu/drm/amd/amdgpu/amdgpu_preempt_mgr.c | |
parent | 1307c5d33cce8a41dd77c2571e4df65a5b627feb (diff) |
serial: sunsab: Fix error handling in sunsab_init()
The sunsab_init() returns the platform_driver_register() directly without
checking its return value, if platform_driver_register() failed, the
allocated sunsab_ports is leaked.
Fix by free sunsab_ports and set it to NULL when platform_driver_register()
failed.
Fixes: c4d37215a824 ("[SERIAL] sunsab: Convert to of_driver framework.")
Signed-off-by: Yuan Can <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_preempt_mgr.c')
0 files changed, 0 insertions, 0 deletions