Let R be a prime ring of characteristic not 2, C be the extended centroid of R, and f: R → R be an additive map. Suppose that [f(x), x2] = 0 for all x ∈ R. Then there exist λ ∈ C and an additive map ζ: R → C such that f(x) = λx + ζ(x) for all x ∈ R. In particular, if f(x)2 = x2 for all x ∈ R, then ζ = 0 and either λ = 1 or λ= -1.