[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100912205248.GE25351@bicker>
Date: Sun, 12 Sep 2010 22:52:49 +0200
From: Dan Carpenter <error27@...il.com>
To: Vasiliy Kulikov <segooon@...il.com>
Cc: kernel-janitors@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...e.de>, Al Cho <acho@...ell.com>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: keucr: check kmalloc() return value
On Sun, Sep 12, 2010 at 10:56:43PM +0400, Vasiliy Kulikov wrote:
> kmalloc() may fail, if so return error code.
> Also don't alloc 16 bytes from the heap, use stack instead.
I don't have ENE_SendScsiCmd() in my repo, but I think it's a DMA
function. You're not supposed to use stack memory for DMA transfers.
This is documented in: Documentation/DMA-API-HOWTO.txt
So the original code is correct here (except that there is no error
handling).
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists