samples/kobject: Use kstrtoint instead of sscanf