From 7f1f786ac27c081e1e31a5ff7bebdd66409d8eb6 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 10 Feb 2015 13:33:22 +0000 Subject: [PATCH] scst_local: Remove two superfluous tests (merge r5385 from trunk) git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@6051 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst_local/scst_local.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index 42c4dd7ab..76b8b0bc3 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -1666,11 +1666,6 @@ static int scst_local_driver_remove(struct device *dev) TRACE_ENTRY(); sess = to_scst_lcl_sess(dev); - if (!sess) { - PRINT_ERROR("%s", "Unable to locate sess info"); - return -ENODEV; - } - scsi_remove_host(sess->shost); scsi_host_put(sess->shost); @@ -1735,8 +1730,6 @@ static void scst_local_release_adapter(struct device *dev) TRACE_ENTRY(); sess = to_scst_lcl_sess(dev); - if (sess == NULL) - goto out; /* * At this point the SCSI device is almost gone because the SCSI @@ -1769,7 +1762,6 @@ static void scst_local_release_adapter(struct device *dev) scst_unregister_session(sess->scst_sess, false, scst_local_free_sess); -out: TRACE_EXIT(); return; }