mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-28 09:20:18 +00:00
scst: Remove dead code from scst_assign_dev_handler()
Detected by Coverity. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
This commit is contained in:
@@ -2095,10 +2095,6 @@ int scst_assign_dev_handler(struct scst_device *dev,
|
||||
|
||||
assign:
|
||||
dev->handler = handler;
|
||||
|
||||
if (handler == NULL)
|
||||
goto out;
|
||||
|
||||
dev->threads_num = handler->threads_num;
|
||||
dev->threads_pool_type = handler->threads_pool_type;
|
||||
dev->max_write_same_len = 256 * 1024 * 1024; /* 256 MB */
|
||||
@@ -2144,7 +2140,7 @@ out:
|
||||
return res;
|
||||
|
||||
out_err_detach_tgt:
|
||||
if (handler && handler->detach_tgt) {
|
||||
if (handler->detach_tgt) {
|
||||
list_for_each_entry(tgt_dev, &attached_tgt_devs,
|
||||
extra_tgt_dev_list_entry) {
|
||||
TRACE_DBG("Calling handler's detach_tgt(%p)",
|
||||
@@ -2157,7 +2153,7 @@ out_err_detach_tgt:
|
||||
scst_devt_dev_sysfs_del(dev);
|
||||
|
||||
out_detach:
|
||||
if (handler && handler->detach) {
|
||||
if (handler->detach) {
|
||||
TRACE_DBG("%s", "Calling handler's detach()");
|
||||
handler->detach(dev);
|
||||
TRACE_DBG("%s", "Handler's detach() returned");
|
||||
|
||||
Reference in New Issue
Block a user