diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c
index d66c22b..c3ac432 100644
--- a/profiles/audio/a2dp.c
+++ b/profiles/audio/a2dp.c
static void invalidate_remote_cache(struct a2dp_setup *setup,
struct avdtp_error *err)
{
- if (err->category == AVDTP_ERRNO ||
- err->err.error_code != AVDTP_UNSUPPORTED_CONFIGURATION)
+ if (err->category == AVDTP_ERRNO)
return;
- /* Attempt to unregister Remote SEP if configuration
- * fails with Unsupported Configuration and it was
+ /* Attempt to unregister Remote SEP if configuration fails and it was
* loaded from cache.
*/
if (setup->rsep && setup->rsep->from_cache) {