Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 808b2d92 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "diag: Check if usb is connected while allocating usb requests"

parents 86120403 cc635188
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -105,7 +105,7 @@ static void usb_connect(struct diag_usb_info *ch)
	int num_write = 0;
	int num_read = 1; /* Only one read buffer for any USB channel */

	if (!ch)
	if (!ch || !ch->connected)
		return;

	num_write = diag_mempools[ch->mempool].poolsize;