linux-stable/drivers/ptp
SongJingyi 3907fcb5a4 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-05 11:23:47 +02:00
..
idt8a340_reg.h
Kconfig
Makefile
ptp_chardev.c
ptp_clock.c
ptp_clockmatrix.c
ptp_clockmatrix.h
ptp_dte.c
ptp_idt82p33.c
ptp_idt82p33.h
ptp_ines.c
ptp_kvm.c
ptp_pch.c ptp_pch: Load module automatically if ID matches 2021-10-13 10:04:27 +02:00
ptp_private.h
ptp_qoriq.c ptp_qoriq: fix memory leak in probe() 2023-04-05 11:23:47 +02:00
ptp_qoriq_debugfs.c
ptp_sysfs.c ptp: replace snprintf with sysfs_emit 2022-04-13 21:00:55 +02:00
ptp_vmw.c