diff --git a/.clang-tidy b/.clang-tidy
index 51ee20b..24f78f0 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -246,6 +246,7 @@
 readability-redundant-function-ptr-dereference,
 readability-redundant-member-init,
 readability-redundant-preprocessor,
+readability-redundant-smartptr-get,
 readability-simplify-subscript-expr,
 readability-static-definition-in-anonymous-namespace,
 readability-string-compare,
diff --git a/item_updater.cpp b/item_updater.cpp
index fd51adb..2215b71 100644
--- a/item_updater.cpp
+++ b/item_updater.cpp
@@ -517,7 +517,7 @@
         if (intf.second->redundancyPriority)
         {
             priorityMap.insert(std::make_pair(
-                intf.first, intf.second->redundancyPriority.get()->priority()));
+                intf.first, intf.second->redundancyPriority->priority()));
         }
     }
 
@@ -546,8 +546,7 @@
         {
             ++freePriorityValue;
             auto it = activations.find(element.first);
-            it->second->redundancyPriority.get()->sdbusPriority(
-                freePriorityValue);
+            it->second->redundancyPriority->sdbusPriority(freePriorityValue);
         }
     }
 
@@ -703,7 +702,7 @@
     {
         if (intf.second->redundancyPriority)
         {
-            if (intf.second->redundancyPriority.get()->priority() < value)
+            if (intf.second->redundancyPriority->priority() < value)
             {
                 return false;
             }
@@ -725,20 +724,20 @@
 
 void ItemUpdater::resetUbootEnvVars()
 {
-    decltype(activations.begin()->second->redundancyPriority.get()->priority())
+    decltype(activations.begin()->second->redundancyPriority->priority())
         lowestPriority = std::numeric_limits<uint8_t>::max();
     decltype(activations.begin()->second->versionId) lowestPriorityVersion;
     for (const auto& intf : activations)
     {
-        if (!intf.second->redundancyPriority.get())
+        if (!intf.second->redundancyPriority)
         {
             // Skip this version if the redundancyPriority is not initialized.
             continue;
         }
 
-        if (intf.second->redundancyPriority.get()->priority() <= lowestPriority)
+        if (intf.second->redundancyPriority->priority() <= lowestPriority)
         {
-            lowestPriority = intf.second->redundancyPriority.get()->priority();
+            lowestPriority = intf.second->redundancyPriority->priority();
             lowestPriorityVersion = intf.second->versionId;
         }
     }
@@ -755,7 +754,7 @@
     for (const auto& iter : activations)
     {
         if (iter.second->redundancyPriority &&
-            iter.second->redundancyPriority.get()->priority() == 0)
+            iter.second->redundancyPriority->priority() == 0)
         {
             versionIDtoErase = iter.second->versionId;
             break;
