Skip to content

Commit d919523

Browse files
Wolfram Sanggregkh
authored andcommitted
usb: wusbcore: security: 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>
1 parent 90b6138 commit d919523

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎drivers/usb/wusbcore/security.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,10 +374,8 @@ int wusb_dev_4way_handshake(struct wusbhc *wusbhc, struct wusb_dev *wusb_dev,
374374
struct wusb_keydvt_out keydvt_out;
375375

376376
hs = kcalloc(3, sizeof(hs[0]), GFP_KERNEL);
377-
if (hs == NULL) {
378-
dev_err(dev, "can't allocate handshake data\n");
377+
if (!hs)
379378
goto error_kzalloc;
380-
}
381379

382380
/* We need to turn encryption before beginning the 4way
383381
* hshake (WUSB1.0[.3.2.2]) */

0 commit comments

Comments
 (0)