diff --git a/fw-update/device_updater.cpp b/fw-update/device_updater.cpp
index 49b6326..50456eb 100644
--- a/fw-update/device_updater.cpp
+++ b/fw-update/device_updater.cpp
@@ -57,7 +57,7 @@
 
     rc = updateManager->handler.registerRequest(
         eid, instanceId, PLDM_FWUP, PLDM_REQUEST_UPDATE, std::move(request),
-        std::move(std::bind_front(&DeviceUpdater::requestUpdate, this)));
+        std::bind_front(&DeviceUpdater::requestUpdate, this));
     if (rc)
     {
         // Handle error scenario
@@ -186,7 +186,7 @@
     rc = updateManager->handler.registerRequest(
         eid, instanceId, PLDM_FWUP, PLDM_PASS_COMPONENT_TABLE,
         std::move(request),
-        std::move(std::bind_front(&DeviceUpdater::passCompTable, this)));
+        std::bind_front(&DeviceUpdater::passCompTable, this));
     if (rc)
     {
         // Handle error scenario
@@ -317,7 +317,7 @@
 
     rc = updateManager->handler.registerRequest(
         eid, instanceId, PLDM_FWUP, PLDM_UPDATE_COMPONENT, std::move(request),
-        std::move(std::bind_front(&DeviceUpdater::updateComponent, this)));
+        std::bind_front(&DeviceUpdater::updateComponent, this));
     if (rc)
     {
         // Handle error scenario
@@ -669,7 +669,7 @@
 
     rc = updateManager->handler.registerRequest(
         eid, instanceId, PLDM_FWUP, PLDM_ACTIVATE_FIRMWARE, std::move(request),
-        std::move(std::bind_front(&DeviceUpdater::activateFirmware, this)));
+        std::bind_front(&DeviceUpdater::activateFirmware, this));
     if (rc)
     {
         error(
diff --git a/fw-update/inventory_manager.cpp b/fw-update/inventory_manager.cpp
index f341f28..b466984 100644
--- a/fw-update/inventory_manager.cpp
+++ b/fw-update/inventory_manager.cpp
@@ -37,8 +37,7 @@
         rc = handler.registerRequest(
             eid, instanceId, PLDM_FWUP, PLDM_QUERY_DEVICE_IDENTIFIERS,
             std::move(requestMsg),
-            std::move(std::bind_front(&InventoryManager::queryDeviceIdentifiers,
-                                      this)));
+            std::bind_front(&InventoryManager::queryDeviceIdentifiers, this));
         if (rc)
         {
             error(
@@ -170,8 +169,7 @@
     rc = handler.registerRequest(
         eid, instanceId, PLDM_FWUP, PLDM_GET_FIRMWARE_PARAMETERS,
         std::move(requestMsg),
-        std::move(
-            std::bind_front(&InventoryManager::getFirmwareParameters, this)));
+        std::bind_front(&InventoryManager::getFirmwareParameters, this));
     if (rc)
     {
         error(
diff --git a/host-bmc/host_pdr_handler.cpp b/host-bmc/host_pdr_handler.cpp
index 3621f92..dee768e 100644
--- a/host-bmc/host_pdr_handler.cpp
+++ b/host-bmc/host_pdr_handler.cpp
@@ -194,7 +194,7 @@
     rc = handler->registerRequest(
         mctp_eid, instanceId, PLDM_PLATFORM, PLDM_GET_PDR,
         std::move(requestMsg),
-        std::move(std::bind_front(&HostPDRHandler::processHostPDRs, this)));
+        std::bind_front(&HostPDRHandler::processHostPDRs, this));
     if (rc)
     {
         error(
@@ -679,7 +679,7 @@
 {
     deferredPDRRepoChgEvent.reset();
     this->sendPDRRepositoryChgEvent(
-        std::move(std::vector<uint8_t>(1, PLDM_PDR_ENTITY_ASSOCIATION)),
+        std::vector<uint8_t>(1, PLDM_PDR_ENTITY_ASSOCIATION),
         FORMAT_IS_PDR_HANDLES);
 }
 
diff --git a/oem/ibm/libpldmresponder/file_table.cpp b/oem/ibm/libpldmresponder/file_table.cpp
index d0b06bc..d91c482 100644
--- a/oem/ibm/libpldmresponder/file_table.cpp
+++ b/oem/ibm/libpldmresponder/file_table.cpp
@@ -134,7 +134,7 @@
     static FileTable table;
     if (table.isEmpty())
     {
-        table = std::move(FileTable(fileTablePath));
+        table = FileTable(fileTablePath);
     }
     return table;
 }
diff --git a/requester/test/handler_test.cpp b/requester/test/handler_test.cpp
index 4ac7861..19afdd1 100644
--- a/requester/test/handler_test.cpp
+++ b/requester/test/handler_test.cpp
@@ -83,7 +83,7 @@
     EXPECT_EQ(instanceId, 0);
     auto rc = reqHandler.registerRequest(
         eid, instanceId, 0, 0, std::move(request),
-        std::move(std::bind_front(&HandlerTest::pldmResponseCallBack, this)));
+        std::bind_front(&HandlerTest::pldmResponseCallBack, this));
     EXPECT_EQ(rc, PLDM_SUCCESS);
 
     pldm::Response response(sizeof(pldm_msg_hdr) + sizeof(uint8_t));
@@ -104,7 +104,7 @@
     EXPECT_EQ(instanceId, 0);
     auto rc = reqHandler.registerRequest(
         eid, instanceId, 0, 0, std::move(request),
-        std::move(std::bind_front(&HandlerTest::pldmResponseCallBack, this)));
+        std::bind_front(&HandlerTest::pldmResponseCallBack, this));
     EXPECT_EQ(rc, PLDM_SUCCESS);
 
     // Waiting for 500ms so that the instance ID expiry callback is invoked
@@ -123,7 +123,7 @@
     EXPECT_EQ(instanceId, 0);
     auto rc = reqHandler.registerRequest(
         eid, instanceId, 0, 0, std::move(request),
-        std::move(std::bind_front(&HandlerTest::pldmResponseCallBack, this)));
+        std::bind_front(&HandlerTest::pldmResponseCallBack, this));
     EXPECT_EQ(rc, PLDM_SUCCESS);
 
     pldm::Request requestNxt{};
@@ -131,7 +131,7 @@
     EXPECT_EQ(instanceIdNxt, 1);
     rc = reqHandler.registerRequest(
         eid, instanceIdNxt, 0, 0, std::move(requestNxt),
-        std::move(std::bind_front(&HandlerTest::pldmResponseCallBack, this)));
+        std::bind_front(&HandlerTest::pldmResponseCallBack, this));
     EXPECT_EQ(rc, PLDM_SUCCESS);
 
     pldm::Response response(sizeof(pldm_msg_hdr) + sizeof(uint8_t));
