PCI: endpoint: Return error if EPC is started/stopped multiple times
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Fri, 2 Jun 2023 11:47:50 +0000 (17:17 +0530)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 23 Jun 2023 20:05:11 +0000 (15:05 -0500)
commita504c965588b781f864364e897917a2c7b48ea5b
tree398699fe7d40c64a10401e65dc356cf22df86bb8
parent081c715dfd50542e89df5ee12a8e32e7ed936cd1
PCI: endpoint: Return error if EPC is started/stopped multiple times

When the EPC is started or stopped multiple times from configfs, just
return -EALREADY. There is no need to call the EPC start/stop functions
in those cases.

Link: https://lore.kernel.org/r/20230602114756.36586-4-manivannan.sadhasivam@linaro.org
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Kishon Vijay Abraham I <kishon@kernel.org>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
drivers/pci/endpoint/pci-ep-cfs.c