From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/exynos: vidi: use priv->vidi_dev for ctx lookup in vidi_connection_ioctl() Date: Mon, 23 Feb 2026 06:11:02 +1000 Message-ID: In-Reply-To: <20260220033550.124346-2-aha310510@gmail.com> References: <20260220033550.124346-1-aha310510@gmail.com> <20260220033550.124346-2-aha310510@gmail.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review This patch fixes the bug where `vidi_connection_ioctl()` was calling `dev_get_drvdata(drm_dev->dev)`, which returns the driver data for the exynos-drm master device rather than the vidi component device. The fix adds a `vidi_dev` field to `exynos_drm_private`, sets it during bind, clears it during unbind, and uses it in the ioctl to retrieve the correct `vidi_context`. > + struct exynos_drm_private *priv = drm_dev->dev_private; > + struct device *dev = priv ? priv->vidi_dev : NULL; > + struct vidi_context *ctx = dev ? dev_get_drvdata(dev) : NULL; > + if (!ctx) > + return -ENODEV; The NULL checks on `priv` are defensive -- `dev_private` should always be set if the ioctl is reachable through the DRM device -- but the important case is when `vidi_dev` is NULL because the vidi component hasn't been bound (or has been unbound). Returning `-ENODEV` is the correct behavior in that case. > + if (priv) > + priv->vidi_dev = dev; > + if (priv) > + priv->vidi_dev = NULL; Same defensive NULL check on `priv` in bind and unbind. In practice, `drm_dev->dev_private` is set before components bind, but there's no harm in the check. This matches what was merged upstream. No issues found. --- Generated by Claude Code Patch Reviewer