net/hns3: fix return value for unsupported tuple
[dpdk.git] / drivers / net / enic / enic_fm_flow.c
index f0bda19..c87d3af 100644 (file)
@@ -1204,7 +1204,7 @@ enic_fm_copy_entry(struct enic_flowman *fm,
                ret = item_info->copy_item(&args);
                if (ret) {
                        /* If copy_item set the error, return that */
-                       if (error->type != RTE_FLOW_ERROR_TYPE_NONE)
+                       if (error && error->type != RTE_FLOW_ERROR_TYPE_NONE)
                                return ret;
                        goto item_not_supported;
                }