android_kernel_xiaomi_sm8450/drivers/ptp
SongJingyi 3907fcb5a4 ptp_qoriq: fix memory leak in probe()
[ Upstream commit f33642224e38d7e0d59336e10e7b4e370b1c4506 ]

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 ptp: ptp_clockmatrix: update to support 4.8.7 firmware 2020-07-30 16:46:59 -07:00
Kconfig ptp_pch: Restore dependency on PCI 2021-08-26 08:35:46 -04:00
Makefile ptp: add VMware virtual PTP clock driver 2020-03-05 17:25:07 -08:00
ptp_chardev.c ptp: only allow phase values lower than 1 period 2020-08-05 12:06:44 -07:00
ptp_clock.c ptp: improve max_adj check against unreasonable values 2021-06-23 14:42:45 +02:00
ptp_clockmatrix.c ptp: clockmatrix: bug fix for idtcm_strverscmp 2020-11-25 17:24:49 -08:00
ptp_clockmatrix.h ptp: ptp_clockmatrix: use i2c_master_send for i2c write 2020-08-19 16:23:22 -07:00
ptp_dte.c ptp: ptp_dte: use devm_platform_ioremap_resource() to simplify code 2019-10-10 16:21:13 -07:00
ptp_idt82p33.c ptp: idt82p33: remove unnecessary comparison 2020-04-24 16:59:21 -07:00
ptp_idt82p33.h ptp: Add a ptp clock driver for IDT 82P33 SMU. 2020-02-24 13:08:46 -08:00
ptp_ines.c ptp: ptp_ines: Remove redundant null check 2020-08-26 07:08:59 -07:00
ptp_kvm.c ptp_kvm: Make kvm_ptp_lock static 2020-04-20 11:02:56 -07:00
ptp_pch.c ptp_pch: Load module automatically if ID matches 2021-10-13 10:04:27 +02:00
ptp_private.h ptp: fix the race between the release of ptp_clock and cdev 2019-12-30 20:19:27 -08:00
ptp_qoriq_debugfs.c ptp_qoriq: add little enadian support 2019-02-12 12:58:48 -05:00
ptp_qoriq.c ptp_qoriq: fix memory leak in probe() 2023-04-05 11:23:47 +02:00
ptp_sysfs.c ptp: replace snprintf with sysfs_emit 2022-04-13 21:00:55 +02:00
ptp_vmw.c ptp: add VMware virtual PTP clock driver 2020-03-05 17:25:07 -08:00