diff options
author | Joe Perches <joe@perches.com> | 2013-02-03 17:28:12 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-04 13:22:34 -0500 |
commit | 1d5d1fdc52b879d8d2bb40546472b4dcfd99f118 (patch) | |
tree | 1a473daf8616769c3aaa8272d2c64bfca0a43963 /drivers/net/wan/farsync.c | |
parent | 38673c8218a6bcaac97b0243089e33617e28f43f (diff) | |
download | op-kernel-dev-1d5d1fdc52b879d8d2bb40546472b4dcfd99f118.zip op-kernel-dev-1d5d1fdc52b879d8d2bb40546472b4dcfd99f118.tar.gz |
wan: Remove unnecessary alloc/OOM messages
alloc failures already get standardized OOM
messages and a dump_stack.
Hoist assigns from if tests.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan/farsync.c')
-rw-r--r-- | drivers/net/wan/farsync.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c index 56941d6..3f0c4f2 100644 --- a/drivers/net/wan/farsync.c +++ b/drivers/net/wan/farsync.c @@ -2448,11 +2448,9 @@ fst_add_one(struct pci_dev *pdev, const struct pci_device_id *ent) } /* Allocate driver private data */ - card = kzalloc(sizeof (struct fst_card_info), GFP_KERNEL); - if (card == NULL) { - pr_err("FarSync card found but insufficient memory for driver storage\n"); + card = kzalloc(sizeof(struct fst_card_info), GFP_KERNEL); + if (card == NULL) return -ENOMEM; - } /* Try to enable the device */ if ((err = pci_enable_device(pdev)) != 0) { |