From 5efa5103b0e7b5c63d36c4df224c2bdeff276413 Mon Sep 17 00:00:00 2001
From: Paul B Mahol <onemda@gmail.com>
Date: Fri, 26 Jul 2013 21:09:06 +0000
Subject: [PATCH] sgidec: simplify return path

Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
 libavcodec/sgidec.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c
index e7f453bc174..c6e7508d50c 100644
--- a/libavcodec/sgidec.c
+++ b/libavcodec/sgidec.c
@@ -223,13 +223,11 @@ static int decode_frame(AVCodecContext *avctx,
     } else {
         ret = read_uncompressed_sgi(out_buf, s);
     }
-
-    if (ret == 0) {
-        *got_frame = 1;
-        return avpkt->size;
-    } else {
+    if (ret)
         return ret;
-    }
+
+    *got_frame = 1;
+    return avpkt->size;
 }
 
 AVCodec ff_sgi_decoder = {
-- 
GitLab