]> git.baikalelectronics.ru Git - kernel.git/commit
ptp: ocp: Fix a resource leak in an error handling path
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Wed, 12 May 2021 11:15:29 +0000 (13:15 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 May 2021 21:06:33 +0000 (14:06 -0700)
commitc6a093891594a98767c04796f2ac040f074121d5
treea679480ce04a1f8874e04139be63827ea8078849
parent3eebbb9e67c73afc285b85bc3e13d10d2f802294
ptp: ocp: Fix a resource leak in an error handling path

If an error occurs after a successful 'pci_ioremap_bar()' call, it must be
undone by a corresponding 'pci_iounmap()' call, as already done in the
remove function.

Fixes: ed9e9ae42581 ("ptp: Add clock driver for the OpenCompute TimeCard.")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ptp/ptp_ocp.c