staging: ks7010: remove unnecessary 'out of memory' message
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Tue, 3 Apr 2018 15:12:54 +0000 (17:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Apr 2018 12:22:07 +0000 (14:22 +0200)
This commit removes unnecessay out of memory message
fixing the following checkpach.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks7010_sdio.c

index 53c9afc06df39139622521e6b632a79925ca989a..48c7cc83d4a30e9d50d363c317994958e9b4cc7a 100644 (file)
@@ -957,10 +957,8 @@ static int send_stop_request(struct sdio_func *func)
        card = sdio_get_drvdata(func);
 
        pp = kzalloc(hif_align_size(sizeof(*pp)), GFP_KERNEL);
-       if (!pp) {
-               netdev_err(card->priv->net_dev, "allocate memory failed..\n");
+       if (!pp)
                return -ENOMEM;
-       }
 
        size = sizeof(*pp) - sizeof(pp->header.size);
        pp->header.size = cpu_to_le16((uint16_t)size);