Skip to content

Commit

Permalink
Staging: crystalhd: change GFP_ATOMIC to GFP_KERNEL
Browse files Browse the repository at this point in the history
These two allocations are only called from the probe() path and there
aren't any locks held for probe().

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Mar 14, 2011
1 parent 89a4d0c commit a3b6ff0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/staging/crystalhd/crystalhd_lnx.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,7 @@ static int __devinit chd_dec_init_chdev(struct crystalhd_adp *adp)

/* Allocate general purpose ioctl pool. */
for (i = 0; i < CHD_IODATA_POOL_SZ; i++) {
/* FIXME: jarod: why atomic? */
temp = kzalloc(sizeof(struct crystalhd_ioctl_data), GFP_ATOMIC);
temp = kzalloc(sizeof(struct crystalhd_ioctl_data), GFP_KERNEL);
if (!temp) {
BCMLOG_ERR("ioctl data pool kzalloc failed\n");
rc = -ENOMEM;
Expand Down Expand Up @@ -549,8 +548,7 @@ static int __devinit chd_dec_pci_probe(struct pci_dev *pdev,
pdev->vendor, pdev->device, pdev->subsystem_vendor,
pdev->subsystem_device);

/* FIXME: jarod: why atomic? */
pinfo = kzalloc(sizeof(struct crystalhd_adp), GFP_ATOMIC);
pinfo = kzalloc(sizeof(struct crystalhd_adp), GFP_KERNEL);
if (!pinfo) {
BCMLOG_ERR("Failed to allocate memory\n");
return -ENOMEM;
Expand Down

0 comments on commit a3b6ff0

Please sign in to comment.