diff options
Diffstat (limited to 'drivers/target/target_core_configfs.c')
-rw-r--r-- | drivers/target/target_core_configfs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index c9254d7ad18..9721ef28335 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c @@ -1827,7 +1827,9 @@ static ssize_t target_core_store_dev_enable( return -EINVAL; dev = t->create_virtdevice(hba, se_dev, se_dev->se_dev_su_ptr); - if (!(dev) || IS_ERR(dev)) + if (IS_ERR(dev)) + return PTR_ERR(dev); + else if (!dev) return -EINVAL; se_dev->se_dev_ptr = dev; |