The other KMOD_EXPORT'ed functions protect against ctx being NULL.
Add this to kmod_get_dirname purely for consistency reasons.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/102 Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>