From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: fbdev: wmt_ge_rops: use devm_platform_ioremap_resource() Date: Thu, 05 Mar 2026 13:20:54 +1000 Message-ID: In-Reply-To: <20260304-master-v1-1-2bfeb1b9559f@gmail.com> References: <20260304-master-v1-1-2bfeb1b9559f@gmail.com> <20260304-master-v1-1-2bfeb1b9559f@gmail.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Bug: `regbase` left as ERR_PTR on probe failure** When `devm_platform_ioremap_resource()` fails, it returns an ERR_PTR value = which gets assigned to `regbase`. The function then returns the error code,= but `regbase` is left holding a non-NULL error-pointer value. On a subsequ= ent probe attempt (or re-probe), the single-instance guard at line 152: ```c if (unlikely(regbase)) { WARN_ON(1); return -EBUSY; } ``` will see the stale ERR_PTR as non-NULL, fire the WARN_ON, and return `-EBUS= Y` =E2=80=94 permanently blocking the driver from ever probing successfully= again. Fix: reset `regbase` to NULL in the error path: ```c regbase =3D devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(regbase)) { int ret =3D PTR_ERR(regbase); regbase =3D NULL; return ret; } ``` **Removal of `iounmap()` is correct** =E2=80=94 `devm_platform_ioremap_reso= urce()` registers a devres action that automatically unmaps on device remov= al, so the explicit `iounmap()` must go. Setting `regbase =3D NULL` in `rem= ove()` is the right thing to do for the re-probe guard. **Minor: no `dev_err` on failure** =E2=80=94 The original code printed `"fa= iled to map I/O memory"` on failure. `devm_platform_ioremap_resource()` doe= s emit its own error messages internally, so dropping the explicit `dev_err= ` is fine. **Overall:** The patch needs a v2 to fix the ERR_PTR-in-`regbase` issue on = the error path. Otherwise the conversion is clean and correct. --- Generated by Claude Code Patch Reviewer