diff --git a/meta/classes/kernel-yocto.bbclass 
b/meta/classes/kernel-yocto.bbclass
index 1d5a8cdf29..d35f4629cb 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -562,7 +562,10 @@ python do_kernel_configcheck() {
          bb.fatal( "config analysis failed: %s" % e.output.decode('utf-8'))
       if analysis:
-        outfile = "{}/{}/cfg/mismatch.txt".format( s, kmeta )
+        outpath = "{}/{}/cfg".format( s, kmeta )
+        if not os.path.exists(outpath):
+            os.makedirs(outpath)
+        outfile = "{}/mismatch.txt".format(outpath)
          if os.path.isfile(outfile):
             os.remove(outfile)
          with open(outfile, 'w+') as f:
@@ -584,7 +587,10 @@ python do_kernel_configcheck() {
