Section 158(2) in The Andhra Pradesh Charitable and Hindu Religious Institutions and Endowments Act, 1987
(2)A charitable or religious endowment created for purposes, some of which are charitable or religious and some are not, shall not be deemed to be void in regard to the charitable or religious purpose, only on the ground that it is void in respect of the purposes which are not charitable or religious.