Claude review: drm/v3d: Use devm_reset_control_get_optional_exclusive()

Claude Code Review Bot
2026-02-13T21:21:53Z

Patch Review

> - v3d->reset = devm_reset_control_get_exclusive(dev, NULL);
> + v3d->reset = devm_reset_control_get_optional_exclusive(dev, NULL);
> if (IS_ERR(v3d->reset)) {
> - ret = PTR_ERR(v3d->reset);
> + ret = dev_err_probe(dev, PTR_ERR(v3d->reset),
> + "Failed to get reset control\n");
> + goto clk_disable;
> + }
>
> - if (ret == -EPROBE_DEFER)
> - goto clk_disable;
> -
> - v3d->reset = NULL;
> + if (!v3d->reset) {
> ret = map_regs(v3d, &v3d->bridge_regs, "bridge");

This is a clean simplification. `devm_reset_control_get_optional_exclusive()` returns NULL when no reset is specified in DT (instead of an error), making the flow clearer. The `dev_err_probe()` usage also properly handles `-EPROBE_DEFER` without a special case.

Note that this patch is immediately superseded by patch 6, which moves this code block. This is fine for bisectability -- each patch is correct on its own -- but worth noting that this patch exists mainly for clarity of the refactoring.

No issues found.