All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
If you had earned ill-gotten money by advertising for forbidden (TV) serials, then you have to repent to Allah by stopping the sin, regretting having done it, being determined to not return to it again in the future, and to get rid of the amount of ill-gotten money by spending it on a good cause and public interests.
As for the money that you have earned afterwards in a lawful manner, such as selling permissible programs and applications, and so on; this money is lawful for you, and it is not forbidden just because you had purchased the lap top with ill-gotten money. The view which we believe to be the preponderant one is that the prohibition is not related to the money itself (the paper notes); rather, the liability (of guaranteeing the ill-gotten amount) falls upon you (i.e., you shoulder the burden of the sin and guarantee to spend the amount as explained above).
For more benefit, please refer to Fataawa 390862 and 346615.
Allah knows best.