Yes and no. You can't deduct the losses, they will be added to the basis.
____ If disposition was by gift or charitable contribution, loss is not deductible. Instead, the basis of the asset for the donee is increased by unused losses. See IRC § 469(j)(6).
_____ If loss is from a "rental", verify that it was not a temporary rental of the taxpayer'sresidence. If the rental period was less than a year or two, IRS may view it as a temporary rental lacking in the necessary profit motive under IRC § 183, i.e. a nondeductible loss. Deductions for rental of a personal residence may also be limited under IRC § 280
https://www.irs.gov/businesses/small-businesses-self-employed/passive-activity-loss-atg-exhibit-5-2-...