]> Pileus Git - ~andy/linux/blobdiff - drivers/target/target_core_fabric_configfs.c
Merge branches 'battery-scope', 'logitech' and 'multitouch' into for-linus
[~andy/linux] / drivers / target / target_core_fabric_configfs.c
index 4f77cce22646df958e05c7cf66d37be813f4757f..9a2ce11e1a6e4025d7400dd313ccec64028308b3 100644 (file)
@@ -766,9 +766,9 @@ static int target_fabric_port_link(
 
        lun_p = core_dev_add_lun(se_tpg, dev->se_hba, dev,
                                lun->unpacked_lun);
-       if (IS_ERR(lun_p) || !lun_p) {
+       if (IS_ERR(lun_p)) {
                pr_err("core_dev_add_lun() failed\n");
-               ret = -EINVAL;
+               ret = PTR_ERR(lun_p);
                goto out;
        }