diff --git a/iscsi-scst/kernel/session.c b/iscsi-scst/kernel/session.c index dd80debbe..20990cfca 100644 --- a/iscsi-scst/kernel/session.c +++ b/iscsi-scst/kernel/session.c @@ -102,7 +102,7 @@ static int iscsi_session_alloc(struct iscsi_target *target, if (!session->sess_params.rdma_extensions) { err = iscsi_threads_pool_get( - (bool)scst_get_acg_tgt_priv(session->scst_sess->acg), + scst_get_acg_tgt_priv(session->scst_sess->acg) != NULL, &session->scst_sess->acg->acg_cpu_mask, &session->sess_thr_pool); if (err != 0) diff --git a/iscsi-scst/kernel/target.c b/iscsi-scst/kernel/target.c index 3abe23f21..3b563139f 100644 --- a/iscsi-scst/kernel/target.c +++ b/iscsi-scst/kernel/target.c @@ -665,7 +665,7 @@ static ssize_t iscsi_acg_sess_dedicated_threads_show(struct kobject *kobj, TRACE_ENTRY(); acg = container_of(kobj, struct scst_acg, acg_kobj); - dedicated = (bool)scst_get_acg_tgt_priv(acg); + dedicated = scst_get_acg_tgt_priv(acg) != NULL; pos = sprintf(buf, "%d\n%s", dedicated, dedicated ? SCST_SYSFS_KEY_MARK "\n" : "");