diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index e934274aabf0d9125c01b9c289802340b46735d1..7e48df80b9e9f2c3473cda837a80a776c152140b 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -4171,7 +4171,7 @@ class LUSetInstanceParms(LogicalUnit):
       self.do_initrd_path = True
       if self.initrd_path not in (constants.VALUE_NONE,
                                   constants.VALUE_DEFAULT):
-        if not os.path.isabs(self.kernel_path):
+        if not os.path.isabs(self.initrd_path):
           raise errors.OpPrereqError("The initrd path must be an absolute"
                                     " filename")
     else: