diff --git a/plugins/elements/gstfilesink.c b/plugins/elements/gstfilesink.c
index eb5c768..1432448 100644
--- a/plugins/elements/gstfilesink.c
+++ b/plugins/elements/gstfilesink.c
@@ -439,7 +439,8 @@ gst_file_sink_close_file (GstFileSink * sink)
 {
   if (sink->file) {
     if (fclose (sink->file) != 0)
-      goto close_failed;
+      GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE,
+        (_("Error closing file \"%s\"."), sink->filename), GST_ERROR_SYSTEM);
 
     GST_DEBUG_OBJECT (sink, "closed file");
     sink->file = NULL;
@@ -447,15 +448,6 @@ gst_file_sink_close_file (GstFileSink * sink)
     g_free (sink->buffer);
     sink->buffer = NULL;
   }
-  return;
-
-  /* ERRORS */
-close_failed:
-  {
-    GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE,
-        (_("Error closing file \"%s\"."), sink->filename), GST_ERROR_SYSTEM);
-    return;
-  }
 }
 
 static gboolean
