There is no risk in marrying. You are probably asking if you try to apply for the spouse to immigrate? Well, if it gets denied, then it just means it gets denied and the spouse will not be able to immigrate; nothing more should come of it. In the worst case, if they catch you lying to the immigration officers, then yeah, I guess they could put you in jail and/or kick you out of the country.