oem-ibm: Fix null buffer check in PCIeInfoHandler::write

The write operation is currently guarded by an inverted null
check, causing valid buffers to be ignored while allowing a
null pointer to be passed to pcieData.write().
Perform the write only when a valid buffer is provided.

Change-Id: Ib10401a2a239ee27cd819db6654928d4fbf99665
Signed-off-by: Meghana Vangapandu <meghanav@ami.com>
diff --git a/oem/ibm/libpldmresponder/file_io_type_pcie.cpp b/oem/ibm/libpldmresponder/file_io_type_pcie.cpp
index a0f9a61..8837fb7 100644
--- a/oem/ibm/libpldmresponder/file_io_type_pcie.cpp
+++ b/oem/ibm/libpldmresponder/file_io_type_pcie.cpp
@@ -142,7 +142,7 @@
         std::ofstream pcieData(infoFile, std::ios::out | std::ios::binary |
                                              std::ios::app);
 
-        if (!buffer)
+        if (buffer)
         {
             pcieData.write(buffer, length);
         }