[patch] drm: fix end of loop test