If while browsing legal porn you stumble on something illegal, immediately log out and report it to the police, what will happen? Would you get in legal trouble or not? Btw this is just a hypothetical question. I do go on legal porn sites frequently, but I've never cone across this situation thankfully. I just feel it's better to be prepared for that eventuality.
You should be able to make a pretty good judgment about whether a link you're about to click is legal or not. Of course, there may be some deceptive links, but in general, content that is illegal isn't the sort of thing you're likely to run across accidentally. In general, the adult media industry is pretty cautious about rules, and the rules surrounding documentation and records for adult content are very, very strict. So if you're on a legitimate site, it's unlikely that site is going to link to a site with non-legit content. If you do run into something that's obviously illegal (I'm assuming you're talking about underage content rather than, say, bestiality), I would suggest closing the browser window, and reporting it to ASACP.org. That's an adult industry-linked organization that is well connected with both law enforcement and with most major ISPs, so when they have content reported, they are generally able to get it taken offline pretty quickly, and to take appropriate action against the owners of the site. In general, law enforcement isn't interested in the person who accidentally stumbled on one link. Their concern is people who are consistent consumers of illegal content, and those who collect, upload, produce, or redistrubute it (such as through torrents.) I do recommend against using any torrent client for pornography, as it's both rife with viruses and it can be a lot easier to run into questionable or totally illegal content... and since, by the nature of how torrents work, you could easily be sharing something as you are downloading it, that's where you can get into serious trouble.