<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">2013/5/7 Wei Yongjun <span dir="ltr"><<a href="mailto:weiyj.lk@gmail.com" target="_blank">weiyj.lk@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
From: Wei Yongjun <<a href="mailto:yongjun_wei@trendmicro.com.cn">yongjun_wei@trendmicro.com.cn</a>><br>
<br>
Fix to return -ENOMEM in the exynos_plane_init() error handling<br>
case instead of 0, as done elsewhere in this function.<br>
<br>
Signed-off-by: Wei Yongjun <<a href="mailto:yongjun_wei@trendmicro.com.cn">yongjun_wei@trendmicro.com.cn</a>><br>
---<br>
drivers/gpu/drm/exynos/exynos_drm_drv.c | 4 +++-<br>
1 file changed, 3 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c<br>
index ba6d995..3a10373 100644<br>
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c<br>
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c<br>
@@ -91,8 +91,10 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)<br>
unsigned int possible_crtcs = (1 << MAX_CRTC) - 1;<br>
<br>
plane = exynos_plane_init(dev, possible_crtcs, false);<br>
- if (!plane)<br>
+ if (!plane) {<br>
+ ret = -ENOMEM;<br></blockquote><div><br></div><div>I think It's better that exynos_plane_init function returns ERR_PTR(error) instead of NULL and ret = PTR_ERR(plane) if IS_ERR(plane) so could you resend updated patch again?<br>
<br></div><div>Thanks,<br>Inki Dae<br></div><div><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
goto err_release_iommu_mapping;<br>
+ }<br>
}<br>
<br>
ret = drm_vblank_init(dev, MAX_CRTC);<br>
<br>
_______________________________________________<br>
dri-devel mailing list<br>
<a href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/dri-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
</blockquote></div><br></div></div>