On Fri, May 10, 2024 at 06:10:37PM +0300, Dan Carpenter wrote: > Return -EINVAL if "bridge->n_sensors == 0". Don't return success. ... > ret = ipu_bridge_connect_sensors(bridge); > - if (ret || bridge->n_sensors == 0) > + if (ret || bridge->n_sensors == 0) { > + ret = ret ?: -EINVAL; > goto err_unregister_ipu; > + } I would split: ret = ipu_bridge_connect_sensors(bridge); if (ret) goto err_unregister_ipu; if (bridge->n_sensors == 0) { ret = -EINVAL; goto err_unregister_ipu; } -- With Best Regards, Andy Shevchenko