Do not replace error code with AOM_CODEC_ERROR

Forward the error code returned by
aom_get_num_layers_from_operating_point_idc(). Do not replace it with
AOM_CODEC_ERROR.

Change-Id: I278f501398ff411b35db3cb618d6048ef0651510
diff --git a/av1/av1_dx_iface.c b/av1/av1_dx_iface.c
index bd7eaee..be4b1a7 100644
--- a/av1/av1_dx_iface.c
+++ b/av1/av1_dx_iface.c
@@ -247,13 +247,9 @@
     }
   }
 
-  if (aom_get_num_layers_from_operating_point_idc(
-          operating_point_idc0, &si->number_spatial_layers,
-          &si->number_temporal_layers) != AOM_CODEC_OK) {
-    return AOM_CODEC_ERROR;
-  }
-
-  return AOM_CODEC_OK;
+  return aom_get_num_layers_from_operating_point_idc(
+      operating_point_idc0, &si->number_spatial_layers,
+      &si->number_temporal_layers);
 }
 
 static aom_codec_err_t decoder_peek_si_internal(const uint8_t *data,
diff --git a/av1/decoder/obu.c b/av1/decoder/obu.c
index 4809578..c9d3ac1 100644
--- a/av1/decoder/obu.c
+++ b/av1/decoder/obu.c
@@ -222,10 +222,11 @@
     operating_point = 0;
   pbi->current_operating_point =
       seq_params->operating_point_idc[operating_point];
-  if (aom_get_num_layers_from_operating_point_idc(
-          pbi->current_operating_point, &pbi->number_spatial_layers,
-          &pbi->number_temporal_layers) != AOM_CODEC_OK) {
-    pbi->error.error_code = AOM_CODEC_ERROR;
+  aom_codec_err_t status = aom_get_num_layers_from_operating_point_idc(
+      pbi->current_operating_point, &pbi->number_spatial_layers,
+      &pbi->number_temporal_layers);
+  if (status != AOM_CODEC_OK) {
+    pbi->error.error_code = status;
     return 0;
   }