Skip to content

Commit

Permalink
sound: oxygen: zero-initialize model data
Browse files Browse the repository at this point in the history
Model drivers assume that model_data is zeroed, so we better use
kzalloc() (like we did before when it was allocated together with the
card structure).

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Clemens Ladisch authored and Takashi Iwai committed Feb 27, 2009
1 parent 930738d commit 82af308
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/pci/oxygen/oxygen_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
goto err_pci_regions;

if (chip->model.model_data_size) {
chip->model_data = kmalloc(chip->model.model_data_size,
chip->model_data = kzalloc(chip->model.model_data_size,
GFP_KERNEL);
if (!chip->model_data) {
err = -ENOMEM;
Expand Down

0 comments on commit 82af308

Please sign in to comment.