Set valid return value to avoid returning 0 in a failed path of sd_init(). Signed-off-by: Guo Chao <yan@xxxxxxxxxxxxxxxxxx> --- drivers/scsi/sd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 7992635..181cd87 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -3126,6 +3126,7 @@ static int __init init_sd(void) if (err) goto err_out; + err = -ENOMEM; sd_cdb_cache = kmem_cache_create("sd_ext_cdb", SD_EXT_CDB_SIZE, 0, 0, NULL); if (!sd_cdb_cache) { -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html