staging: kpc2000: remove unnecessary oom message in core.c
authorSimon Sandström <simon@nikanor.nu>
Mon, 3 Jun 2019 22:29:12 +0000 (00:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Jun 2019 12:57:01 +0000 (14:57 +0200)
Fixes checkpatch.pl warning "Possible unnecessary 'out of memory'
message".

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/kpc2000/kpc2000/core.c

index dc6940e6c320aa49f90452a27b418c06b9ffd631..a70665a202c30b04c57227a6016bf2fb34877d14 100644 (file)
@@ -319,11 +319,8 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
         * Step 1: Allocate a struct for the pcard
         */
        pcard = kzalloc(sizeof(struct kp2000_device), GFP_KERNEL);
-       if (!pcard) {
-               dev_err(&pdev->dev,
-                       "probe: failed to allocate private card data\n");
+       if (!pcard)
                return -ENOMEM;
-       }
        dev_dbg(&pdev->dev, "probe: allocated struct kp2000_device @ %p\n",
                pcard);