usb: wusbcore: crypto: don't print on ENOMEM
authorWolfram Sang <wsa-dev@sang-engineering.com>
Thu, 25 Aug 2016 17:39:34 +0000 (19:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Aug 2016 17:17:39 +0000 (19:17 +0200)
All kmalloc-based functions print enough information on failures.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/wusbcore/crypto.c

index 33acd15..79b2b62 100644 (file)
@@ -229,10 +229,8 @@ static int wusb_ccm_mac(struct crypto_skcipher *tfm_cbc,
                zero_padding = sizeof(struct aes_ccm_block) - zero_padding;
        dst_size = blen + sizeof(b0) + sizeof(b1) + zero_padding;
        dst_buf = kzalloc(dst_size, GFP_KERNEL);
-       if (dst_buf == NULL) {
-               printk(KERN_ERR "E: can't alloc destination buffer\n");
+       if (!dst_buf)
                goto error_dst_buf;
-       }
 
        memset(iv, 0, sizeof(iv));