The .bypass_val_on setting does not match the .bypass_mask setting, so theI think this will result in exact same behavior. val would be assigned to 1 when enable is set and 0 otherwise. Anyway you are right this line is useless.
.bypass_mask bit will never get set. Fix it by removing .bypass_val_on
setting, the regulator_set_bypass_regmap and regulator_get_bypass_regmap
helpers will use rdev->desc->bypass_mask as val_on if the val_on is 0.
I don't have this h/w to test, please help to review and test the patch.