Seq_item_port related error

I am getting run time error for this code which is part of the driver component class.

ERROR is: Usage of ‘super.seq_item_port.put’ inconsistent with ‘task’ object.

function void axi_master_driver::put_response_to_seq(master_seq_item rsp_item);

if(rsp_item != null && rsp_item.reset_detected == 0)begin    //put reset response of incomplete served requeset
    rsp_item.write_bus_status = TRANSFER_INCOMPLETE;
    rsp_item.read_bus_status =  TRANSFER_INCOMPLETE;
    //seq_item_port.put(rsp_item);
end
if(rsp_item != null && rsp_item.reset_detected == 1)begin    //put response for served request
    seq_item_port.put(rsp_item);
end

endfunction:put_response_to_seq

In reply to voraravi:

You are calling the task put() from a function. This is a violation of the LRM.

In reply to cgales:

Thank You! I got that:)