From: Sergio Paracuellos Date: Tue, 3 Apr 2018 15:12:54 +0000 (+0200) Subject: staging: ks7010: remove unnecessary 'out of memory' message X-Git-Tag: v4.19~841^2~770 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cea78d6124efe56efccd12793ac45e86b9afe3f4;p=platform%2Fkernel%2Flinux-rpi.git staging: ks7010: remove unnecessary 'out of memory' message 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 Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c index 53c9afc..48c7cc8 100644 --- a/drivers/staging/ks7010/ks7010_sdio.c +++ b/drivers/staging/ks7010/ks7010_sdio.c @@ -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);