ipmi: ipmi_powernv: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Message-Id: <22375be2dd616d8ccc2959586a08e49a5ad9e47b.1709655755.git.u.kleine-koenig@pengutronix.de>
Signed-off-by: Corey Minyard <minyard@acm.org>

authored by Uwe Kleine-König and committed by Corey Minyard 26edd74f 23489184

+2 -4
+2 -4
drivers/char/ipmi/ipmi_powernv.c
··· 281 281 return rc; 282 282 } 283 283 284 - static int ipmi_powernv_remove(struct platform_device *pdev) 284 + static void ipmi_powernv_remove(struct platform_device *pdev) 285 285 { 286 286 struct ipmi_smi_powernv *smi = dev_get_drvdata(&pdev->dev); 287 287 288 288 ipmi_unregister_smi(smi->intf); 289 289 free_irq(smi->irq, smi); 290 290 irq_dispose_mapping(smi->irq); 291 - 292 - return 0; 293 291 } 294 292 295 293 static const struct of_device_id ipmi_powernv_match[] = { ··· 302 304 .of_match_table = ipmi_powernv_match, 303 305 }, 304 306 .probe = ipmi_powernv_probe, 305 - .remove = ipmi_powernv_remove, 307 + .remove_new = ipmi_powernv_remove, 306 308 }; 307 309 308 310