I use the same camera lens combo, and sometimes my images are not as sharp as I would like them to be, but on the other hand.. sometimes they are much sharper than I expected. Here is what I found out about it:
Make sure you use a high shutter speed. With the 40mm, the camera will automatically go as low as 1/90, which is too slow for me. Apparently I have shaky hands, so I need a fast shutter speed. The other thing is if the lens is wide open and the DoF is too shallow.
If you are used to DSLRs, the K-01 also has a dfferent AF system. You have a little square (you can change its size btw) and you can move it around the screen. Within that square, the camera will try to maximize contrast/focus. This doesn't mean it will necessarily focus on what you want, though. And especially if I forget to move the square where I want the focus to be
But the K-01 has fewer AA filters than most other cameras and the 40mm lens is very sharp. To really test it you should try placing it (on tripod), turn off SR, use M mode and set ISO to 100 and aperture between f4 and f8, then focus manually. If you want I can post some 100% crops of my K-01/40mm XS shots so you can compare
Oh, and post processing can affect the perceived sharpness as well, everything from contrast to WB.