mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
[PATCH] bluetooth: kmalloc + memset -> kzalloc conversion
Signed-off-by: Deepak Saxena <dsaxena@plexity.net> Cc: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
f5e3c2faa2
commit
089b1dbbde
12 changed files with 12 additions and 31 deletions
|
@ -272,13 +272,11 @@ static int hci_uart_tty_open(struct tty_struct *tty)
|
|||
if (hu)
|
||||
return -EEXIST;
|
||||
|
||||
if (!(hu = kmalloc(sizeof(struct hci_uart), GFP_KERNEL))) {
|
||||
if (!(hu = kzalloc(sizeof(struct hci_uart), GFP_KERNEL))) {
|
||||
BT_ERR("Can't allocate controll structure");
|
||||
return -ENFILE;
|
||||
}
|
||||
|
||||
memset(hu, 0, sizeof(struct hci_uart));
|
||||
|
||||
tty->disc_data = hu;
|
||||
hu->tty = tty;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue