Hello, On Tue, Mar 08, 2022 at 08:03:55PM +0800, hammer hsieh wrote: > > IMHO yes. (Though the most likely error -ENOMEM, in this case no error > > message should be emitted.) > > > > ok, will add error message like below. > if (ret < 0) { > dev_err(dev, "failed to release clock: %d\n", ret); > return ret; > } > or should i modify like > if (ret < 0) { > dev_err(dev, "failed to release clock: %d\n", ret); > return ERR_PTR(ret); > } > i didn't find reference code for it, not sure which one is better? It depends if you return a pointer or an int. Also please make use of %pe instead of %d for error codes to make it easier to understand. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ |
Attachment:
signature.asc
Description: PGP signature