Not really from a credit standpoint. Normally, a voluntary surrender is considered the same as a repossession.  However, that doesn’t mean that you shouldn’t do a voluntary surrender if you can’t afford the asset.
Voluntary surrenders of vehicles, etc. is normally the right thing to do if you simply cannot afford to keep the asset.  However, if possible, you should discuss what to do with a bankruptcy attorney before making any decisions.
Making the wrong decision could adversely affect your qualifications for Chapter 7 or Chapter 13 or otherwise harm your interests.