浏览代码

usb: wusbcore: crypto: don't print on ENOMEM

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>
Wolfram Sang 9 年之前
父节点
当前提交
90b613864d
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      drivers/usb/wusbcore/crypto.c

+ 1 - 3
drivers/usb/wusbcore/crypto.c

@@ -229,10 +229,8 @@ static int wusb_ccm_mac(struct crypto_skcipher *tfm_cbc,
 		zero_padding = sizeof(struct aes_ccm_block) - zero_padding;
 		zero_padding = sizeof(struct aes_ccm_block) - zero_padding;
 	dst_size = blen + sizeof(b0) + sizeof(b1) + zero_padding;
 	dst_size = blen + sizeof(b0) + sizeof(b1) + zero_padding;
 	dst_buf = kzalloc(dst_size, GFP_KERNEL);
 	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;
 		goto error_dst_buf;
-	}
 
 
 	memset(iv, 0, sizeof(iv));
 	memset(iv, 0, sizeof(iv));