If the mutation causes a gain of function of the protein, then the gene is an oncogene (like RAS is activated and gains function in cancer). If the mutation causes the protein to lose its function, then the gene is a tumor suppressor gene (like p53 loses its activity in cancer). I hope this answers your question.