X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Ftarget%2Ftarget_core_hba.c;h=ff95f95dcd13d571a59c70b7f6a7b1c6d0a6120d;hb=1ecc7586922662e3ca2f3f0c3f17fec8749fc621;hp=a25051a37dd78fe7c17b7a807eb882332df828be;hpb=7b77d161ce7e480a660692cab079712fc0268ba2;p=karo-tx-linux.git diff --git a/drivers/target/target_core_hba.c b/drivers/target/target_core_hba.c index a25051a37dd7..ff95f95dcd13 100644 --- a/drivers/target/target_core_hba.c +++ b/drivers/target/target_core_hba.c @@ -36,6 +36,7 @@ #include #include #include +#include #include "target_core_internal.h" @@ -137,8 +138,7 @@ core_alloc_hba(const char *plugin_name, u32 plugin_dep_id, u32 hba_flags) return hba; out_module_put: - if (hba->transport->owner) - module_put(hba->transport->owner); + module_put(hba->transport->owner); hba->transport = NULL; out_free_hba: kfree(hba); @@ -159,8 +159,7 @@ core_delete_hba(struct se_hba *hba) pr_debug("CORE_HBA[%d] - Detached HBA from Generic Target" " Core\n", hba->hba_id); - if (hba->transport->owner) - module_put(hba->transport->owner); + module_put(hba->transport->owner); hba->transport = NULL; kfree(hba);