A camera module performing auto focus by moving a lens unit, comprising: a sensing unit configured to sense a movement of the lens unit; and a controller configured to: control the movement of the lens unit based on a sensing signal sensed by the sensing unit, in response to reception of an initial operation command, move the lens unit to an end point of a maximum movement range, when the lens unit is positioned at the end point of the maximum movement range, compare the sensing signal sensed by the sensing unit with a predetermined reference signal to calculate a compensation value for an error between a current movement value and a target movement value of the lens unit, in response to reception of a focus operation command, move the lens unit to a focus position which is compensated for the error based on the calculated compensation value, wherein the controller is further configured to: - calculate the compensation value by calculating a first compensation value for compensating a drive signal applied to the lens unit and a second compensation value for compensating the sensing signal sensed by the sensing unit, and - store the first compensation value. a sensing unit configured to sense a movement of the lens unit; and a controller configured to: control the movement of the lens unit based on a sensing signal sensed by the sensing unit, in response to reception of an initial operation command, move the lens unit to an end point of a maximum movement range, when the lens unit is positioned at the end point of the maximum movement range, compare the sensing signal sensed by the sensing unit with a predetermined reference signal to calculate a compensation value for an error between a current movement value and a target movement value of the lens unit, in response to reception of a focus operation command, move the lens unit to a focus position which is compensated for the error based on the calculated compensation value, wherein the controller is further configured to: - calculate the compensation value by calculating a first compensation value for compensating a drive signal applied to the lens unit and a second compensation value for compensating the sensing signal sensed by the sensing unit, and - store the first compensation value. control the movement of the lens unit based on a sensing signal sensed by the sensing unit, in response to reception of an initial operation command, move the lens unit to an end point of a maximum movement range, when the lens unit is positioned at the end point of the maximum movement range, compare the sensing signal sensed by the sensing unit with a predetermined reference signal to calculate a compensation value for an error between a current movement value and a target movement value of the lens unit, in response to reception of a focus operation command, move the lens unit to a focus position which is compensated for the error based on the calculated compensation value, wherein the controller is further configured to: - calculate the compensation value by calculating a first compensation value for compensating a drive signal applied to the lens unit and a second compensation value for compensating the sensing signal sensed by the sensing unit, and - store the first compensation value. - calculate the compensation value by calculating a first compensation value for compensating a drive signal applied to the lens unit and a second compensation value for compensating the sensing signal sensed by the sensing unit, and - store the first compensation value.