
< 	simple_recursive_removal(dir, NULL);
---
> 	if (dir != NULL) {
> 		simple_recursive_removal(dir, NULL);
> 	} else {
> 		return -EINVAL;
