In a case where a home position of a carriage and a maintenance position are set on the same side while a wiper is taken as a border, when the carriage at the home position moves for performing recording on a recording medium, a cam is driven so as to cause a release section to move the wiper from a wiping position to a receded position before the carriage moves. Thereafter, movement of the carriage is started. When wiping of a recording head by means of the wiper is not required, by means of returning the wiper to the receded position in advance, unnecessary contact between the wiper and the recording head can be prevented.