mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 17:24:17 +08:00
sdio: kmalloc + memset conversion to kzalloc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
This commit is contained in:
parent
eb65946892
commit
9f2fcf9939
@ -221,12 +221,10 @@ struct sdio_func *sdio_alloc_func(struct mmc_card *card)
|
|||||||
{
|
{
|
||||||
struct sdio_func *func;
|
struct sdio_func *func;
|
||||||
|
|
||||||
func = kmalloc(sizeof(struct sdio_func), GFP_KERNEL);
|
func = kzalloc(sizeof(struct sdio_func), GFP_KERNEL);
|
||||||
if (!func)
|
if (!func)
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
|
|
||||||
memset(func, 0, sizeof(struct sdio_func));
|
|
||||||
|
|
||||||
func->card = card;
|
func->card = card;
|
||||||
|
|
||||||
device_initialize(&func->dev);
|
device_initialize(&func->dev);
|
||||||
|
Loading…
Reference in New Issue
Block a user