linux-stable/drivers/ptp
SongJingyi 43b4331ce0 ptp_qoriq: fix memory leak in probe()
[ Upstream commit f33642224e ]

Smatch complains that:
drivers/ptp/ptp_qoriq.c ptp_qoriq_probe()
warn: 'base' from ioremap() not released.

Fix this by revising the parameter from 'ptp_qoriq->base' to 'base'.
This is only a bug if ptp_qoriq_init() returns on the
first -ENODEV error path.
For other error paths ptp_qoriq->base and base are the same.
And this change makes the code more readable.

Fixes: 7f4399ba40 ("ptp_qoriq: fix NULL access if ptp dt node missing")
Signed-off-by: SongJingyi <u201912584@hust.edu.cn>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
Link: https://lore.kernel.org/r/20230324031406.1895159-1-u201912584@hust.edu.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-04-06 12:10:44 +02:00
..
Kconfig ptp: ocp: Select CRC16 in the Kconfig. 2022-07-27 18:11:34 -07:00
Makefile
ptp_chardev.c
ptp_clock.c ptp: Remove usage of the deprecated ida_simple_xxx API 2022-09-27 17:33:11 -07:00
ptp_clockmatrix.c ptp: ptp_clockmatrix: fix is_single_shot 2022-05-25 21:51:32 -07:00
ptp_clockmatrix.h ptp: ptp_clockmatrix: return -EBUSY if phase pull-in is in progress 2022-05-17 17:49:04 -07:00
ptp_dte.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 2) 2022-06-10 14:51:35 +02:00
ptp_idt82p33.c ptp: idt82p33: use rsmu driver to access i2c/spi bus 2022-03-09 19:50:57 -08:00
ptp_idt82p33.h ptp: idt82p33: use rsmu driver to access i2c/spi bus 2022-03-09 19:50:57 -08:00
ptp_ines.c net_tstamp: add new flag HWTSTAMP_FLAG_BONDED_PHC_INDEX 2021-12-14 12:28:24 +00:00
ptp_kvm_arm.c
ptp_kvm_common.c
ptp_kvm_x86.c
ptp_ocp.c ] ptp: ocp: remove symlink for second GNSS 2022-10-10 08:37:24 +01:00
ptp_pch.c ptp_pch: Remove unused pch_pm_ops 2022-02-08 21:04:32 -08:00
ptp_private.h ptp: vclock: use mutex to fix "sleep on atomic" bug 2023-03-11 13:55:25 +01:00
ptp_qoriq.c ptp_qoriq: fix memory leak in probe() 2023-04-06 12:10:44 +02:00
ptp_qoriq_debugfs.c
ptp_sysfs.c ptp: Add cycles support for virtual clocks 2022-05-10 09:48:08 +02:00
ptp_vclock.c ptp: vclock: use mutex to fix "sleep on atomic" bug 2023-03-11 13:55:25 +01:00
ptp_vmw.c