lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 13 Sep 2017 13:02:16 +0530
From:   Allen Pais <allen.lkml@...il.com>
To:     linux-kernel@...r.kernel.org
Cc:     nouveau@...ts.freedesktop.org, linux-crypto@...r.kernel.org,
        dri-devel@...ts.freedesktop.org, MPT-FusionLinux.pdl@...adcom.com,
        linux-scsi@...r.kernel.org, netdev@...r.kernel.org,
        megaraidlinux.pdl@...adcom.com, target-devel@...r.kernel.org,
        linux-fbdev@...r.kernel.org, linux-btrfs@...r.kernel.org,
        Allen Pais <allen.lkml@...il.com>
Subject: [PATCH 07/10] driver:megaraid: return -ENOMEM on allocation failure.

Signed-off-by: Allen Pais <allen.lkml@...il.com>
---
 drivers/scsi/megaraid/megaraid_mbox.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index ec3c438..b09a0a6 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -724,8 +724,8 @@ megaraid_init_mbox(adapter_t *adapter)
 	 * controllers
 	 */
 	raid_dev = kzalloc(sizeof(mraid_device_t), GFP_KERNEL);
-	if (raid_dev == NULL) return -1;
-
+	if (!raid_dev)
+		return -ENOMEM;
 
 	/*
 	 * Attach the adapter soft state to raid device soft state
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ