OSDN Git Service

platform/x86: amd-pmc: Simplify error handling and store the pci_dev in amd_pmc_dev...
authorSanket Goswami <Sanket.Goswami@amd.com>
Tue, 30 Nov 2021 11:23:17 +0000 (16:53 +0530)
committerHans de Goede <hdegoede@redhat.com>
Tue, 21 Dec 2021 17:47:57 +0000 (18:47 +0100)
commit6a5a14b18972ae03861e2ed15152f731de29baaa
tree4637b6f10b7a491103bd58f2d65a89b7914cd52e
parent400cffd5f4eaf34939530b3a044e31655188b1f9
platform/x86: amd-pmc: Simplify error handling and store the pci_dev in amd_pmc_dev structure

Handle error-exits in the amd_pmc_probe() to avoid duplication and store
the root port information in amd_pmc_probe() so that the information
can be used across multiple routines.

Suggested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com>
Link: https://lore.kernel.org/r/20211130112318.92850-2-Sanket.Goswami@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/amd-pmc.c