Embodiments of the present application relate to the technical field of camera modules, and specifically relate to a
camera module and an electronic device. Embodiments of the present application provide a
camera module, comprising: a shell, a lens
assembly and a driving
assembly, wherein the shell comprises an upper cover and a base arranged along a first direction, the lens
assembly comprises a lens carrier and a lens, the lens carrier is arranged in the shell and can move relative to the shell, the lens carrier is provided with a first protruding structure and a second protruding structure, the first protruding structure is used for abutting against the upper cover, the second protruding structure is used for abutting against the base, the lens is arranged on the lens carrier, the driving assembly comprises a driving
magnet and a driving coil, the driving
magnet is arranged on the lens carrier, the driving coil is arranged on the shell, and the driving coil is used for driving the driving
magnet to move the lens assembly, the lens carrier is formed by only one
single component, which is conducive to reducing the size of the lens carrier, and further conducive to the
miniaturization of the
camera module and the electronic device.