diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c
index 779e88aa60dad42133682cc00df6ddfc86bb1bd6..95e67f66a5f59cba5fe7ef46b027448a3c9c3dd7 100644
--- a/libavcodec/motion_est.c
+++ b/libavcodec/motion_est.c
@@ -744,7 +744,7 @@ static inline int halfpel_motion_search(MpegEncContext * s,
         *mx_ptr = 0;
         *my_ptr = 0;
         return dmin;
-    }else
+    }
 
     xx = 16 * s->mb_x + 8*(n&1);
     yy = 16 * s->mb_y + 8*(n>>1);