Make sure you review this in detail with your buyer agent. If you are using the "AS-IS" inspection language in the standard GCAAR Addendum of Clauses, then 'no', you cannot void the contract based on the results of the home inspection.
To protect yourself, you can add simple language in the contract something like - 'the buyer can declare the contract null and void within X days of ratification in which case the buyer's escrow deposit will be refunded in full'. Don't do this yourself! If you are not working with a buyer's agent, then have a settlement/real estate attorney create the offer and insure that you have the necessary language allowing you to void the contract within the inspection period.
Congressional Residential Realty
Rockville, Md 301-528-REED (7333)
BUT since this is an "as is" contract that is the risk you would take... that's the whole point of an "as is" sale.
If there's an inspection contingency that allows you to back out (pretty standard), then you would get your deposit back. You can always have your agent write in a clause that specifically states that.
Ted Stewart, CRS, e-PRO
Yerman Witman Gaines and Conklin Realty