If the data link layer has error control and flow control , why do we need these 2 mechanisms at transport layer too?
Link layer flow control: Is the way the link layer make sure that each frame access the media in the right way according to the protocol. Is not the same for Ethernet, PPP or Wireless LAN. It only checks if there is permission to send or if it's time to listen.
Transport layer flow control: Is a mechanism between both hosts to regulate the flow of data in order to avoid buffer overruns.
Summary: They are absolutely different.
Link layer Error Control: A method to verify the integrity of frames when they are transmited over the media. The receiving side can verify if the received frame has been damaged on transit. If link layer detects a damaged frame, then it discards the frame and according to the protocol used it can ask for a retransmission.
Transport layer Error Control: The sending side send segments that are divided on multiple packets at network layer and each packet on multiple frames at link level.
The segment travels the network (divided as frames and packets) and is recomposed only at the receiving side.
Between the sending and receiving side could be a lot of intermediate routers. If a router modifies the data in a packet, it will pass undetected until it gets to the error control of the transport layer on the receiving side.
This error control verifies that there wasn't network layer problems that damaged the segment.
Summary: As most of the errors happen on the media, not on network layer (routers, for example) there is a little redundancy, however it ensures the end-end integrity.