Fixes the following smatch warning:

  drivers/message/fusion/mptctl.c:1369 mptctl_getiocinfo() warn:
    possible info leak 'karg'

Signed-off-by: Joe Lawrence <joe.lawre...@stratus.com>
Cc: Christoph Hellwig <h...@infradead.org>
Cc: Dan Carpenter <dan.carpen...@oracle.com>
Cc: Sreekanth Reddy <sreekanth.re...@lsi.com>
---
 drivers/message/fusion/mptctl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c
index dcc8385..e6d8935 100644
--- a/drivers/message/fusion/mptctl.c
+++ b/drivers/message/fusion/mptctl.c
@@ -1261,7 +1261,7 @@ mptctl_getiocinfo (unsigned long arg, unsigned int 
data_size)
        else
                return -EFAULT;
 
-       karg = kmalloc(data_size, GFP_KERNEL);
+       karg = kzalloc(data_size, GFP_KERNEL);
        if (karg == NULL) {
                printk(KERN_ERR MYNAM "%s::mpt_ioctl_iocinfo() @%d - no memory 
available!\n",
                                __FILE__, __LINE__);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to