aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/kernels/concatenate_dataset_op.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/core/kernels/concatenate_dataset_op.cc')
-rw-r--r--tensorflow/core/kernels/concatenate_dataset_op.cc8
1 files changed, 1 insertions, 7 deletions
diff --git a/tensorflow/core/kernels/concatenate_dataset_op.cc b/tensorflow/core/kernels/concatenate_dataset_op.cc
index c3bd89c479..711c234129 100644
--- a/tensorflow/core/kernels/concatenate_dataset_op.cc
+++ b/tensorflow/core/kernels/concatenate_dataset_op.cc
@@ -104,10 +104,6 @@ class ConcatenateDatasetOp : public BinaryDatasetOpKernel {
std::vector<Tensor>* out_tensors,
bool* end_of_sequence) override {
mutex_lock l(mu_);
- if (!input_impl_) {
- *end_of_sequence = true;
- return Status::OK();
- }
while (i_ < 2) {
TF_RETURN_IF_ERROR(
input_impl_->GetNext(ctx, out_tensors, end_of_sequence));
@@ -144,9 +140,7 @@ class ConcatenateDatasetOp : public BinaryDatasetOpKernel {
} else if (i_ == 2) {
input_impl_.reset();
}
- if (input_impl_) {
- TF_RETURN_IF_ERROR(RestoreParent(ctx, reader, input_impl_));
- }
+ TF_RETURN_IF_ERROR(RestoreParent(ctx, reader, input_impl_));
return Status::OK();
}