From the booklet of Rabbi David Shalom Naki, shlit"a: even if the parents did not succeed in keeping Torah and mitzvot at all, saying Kaddish, and especially the study of Torah, still helps to protect them in the World to Come, and even to take them out of Gehinnom and bring them into Gan Eden.