[Nouveau] [PATCH v2] drm/nouveau: honor return type of nvif_mthd, trivial

Tobias Klausmann tobias.johannes.klausmann at mni.thm.de
Fri Jul 14 15:26:09 UTC 2017


nvif_mthd() returns an int, so provide that for return checking

Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de>
---
V2: declare var only once
The other patch should have never get out at all, but as i'm at it, send out a
fixed one!

 drivers/gpu/drm/nouveau/nouveau_display.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index 8d1df5678eaa..58375669d492 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -113,10 +113,11 @@ nouveau_display_scanoutpos_head(struct drm_crtc *crtc, int *vpos, int *hpos,
 	struct drm_vblank_crtc *vblank = &crtc->dev->vblank[drm_crtc_index(crtc)];
 	int retry = 20;
 	bool ret = false;
+	int mthd_ret;
 
 	do {
-		ret = nvif_mthd(&disp->disp, 0, &args, sizeof(args));
-		if (ret != 0)
+		mthd_ret = nvif_mthd(&disp->disp, 0, &args, sizeof(args));
+		if (mthd_ret != 0)
 			return false;
 
 		if (args.scan.vline) {
-- 
2.13.2



More information about the Nouveau mailing list