kernel: fix type bug handle IS_ERR() and friends