It always returns 0 so make it void instead of int. Signed-off-by: Denis Plotnikov <den-plotnikov@xxxxxxxxxxxxxx> --- drivers/crypto/ccp/sp-dev.c | 3 +-- drivers/crypto/ccp/sp-dev.h | 2 +- drivers/crypto/ccp/sp-pci.c | 4 +--- drivers/crypto/ccp/sp-platform.c | 4 +--- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/crypto/ccp/sp-dev.c b/drivers/crypto/ccp/sp-dev.c index 7eb3e46682860..bd6800dc190ca 100644 --- a/drivers/crypto/ccp/sp-dev.c +++ b/drivers/crypto/ccp/sp-dev.c @@ -188,7 +188,7 @@ struct sp_device *sp_alloc_struct(struct device *dev) return sp; } -int sp_init(struct sp_device *sp) +void sp_init(struct sp_device *sp) { sp_add_device(sp); @@ -197,7 +197,6 @@ int sp_init(struct sp_device *sp) if (sp->dev_vdata->psp_vdata) psp_dev_init(sp); - return 0; } void sp_destroy(struct sp_device *sp) diff --git a/drivers/crypto/ccp/sp-dev.h b/drivers/crypto/ccp/sp-dev.h index 6f9d7063257d7..89146a41a228d 100644 --- a/drivers/crypto/ccp/sp-dev.h +++ b/drivers/crypto/ccp/sp-dev.h @@ -136,7 +136,7 @@ void sp_platform_exit(void); struct sp_device *sp_alloc_struct(struct device *dev); -int sp_init(struct sp_device *sp); +void sp_init(struct sp_device *sp); void sp_destroy(struct sp_device *sp); int sp_suspend(struct sp_device *sp); diff --git a/drivers/crypto/ccp/sp-pci.c b/drivers/crypto/ccp/sp-pci.c index 248d98fd8c48d..60ae129997481 100644 --- a/drivers/crypto/ccp/sp-pci.c +++ b/drivers/crypto/ccp/sp-pci.c @@ -299,9 +299,7 @@ static int sp_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) dev_set_drvdata(dev, sp); - ret = sp_init(sp); - if (ret) - goto free_irqs; + sp_init(sp); return 0; diff --git a/drivers/crypto/ccp/sp-platform.c b/drivers/crypto/ccp/sp-platform.c index 3933cac1694d4..5abe531edb48c 100644 --- a/drivers/crypto/ccp/sp-platform.c +++ b/drivers/crypto/ccp/sp-platform.c @@ -161,9 +161,7 @@ static int sp_platform_probe(struct platform_device *pdev) dev_set_drvdata(dev, sp); - ret = sp_init(sp); - if (ret) - goto e_err; + sp_init(sp); dev_notice(dev, "enabled\n"); -- 2.34.1