A locking structure, for fastening together a first case and a second case, includes: a fastening portion disposed on the first case, a hook portion movable between a locking position and a release position, and a tension spring with one end disposed at the second case and the other end disposed at the hook portion. When the hook portion moves to the locking position under an applied force, the hook portion becomes fastened to the fastening portion. After the hook portion has separated from the fastening portion under an applied force, the tension spring exerts a restoring force under which the hook portion returns to the release position. After the hook portion has separated from the fastening portion under the applied force, the tension spring pulls the hook portion back to the release position without a user's manipulation.