An earthquake with a preliminary magnitude of 5 rattled a swath of Southern California on Saturday morning, but there were no immediate reports of injuries or significant damage.