USB: clean up redundant tests on unsigned
temp, bytes and param->{length,sglen,vary} are unsigned so these tests do nothing. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Родитель
3b438e30c6
Коммит
e64a521929
|
@ -455,9 +455,7 @@ static void qh_lines (
|
||||||
(scratch >> 16) & 0x7fff,
|
(scratch >> 16) & 0x7fff,
|
||||||
scratch,
|
scratch,
|
||||||
td->urb);
|
td->urb);
|
||||||
if (temp < 0)
|
if (size < temp)
|
||||||
temp = 0;
|
|
||||||
else if (size < temp)
|
|
||||||
temp = size;
|
temp = size;
|
||||||
size -= temp;
|
size -= temp;
|
||||||
next += temp;
|
next += temp;
|
||||||
|
@ -466,9 +464,7 @@ static void qh_lines (
|
||||||
}
|
}
|
||||||
|
|
||||||
temp = snprintf (next, size, "\n");
|
temp = snprintf (next, size, "\n");
|
||||||
if (temp < 0)
|
if (size < temp)
|
||||||
temp = 0;
|
|
||||||
else if (size < temp)
|
|
||||||
temp = size;
|
temp = size;
|
||||||
size -= temp;
|
size -= temp;
|
||||||
next += temp;
|
next += temp;
|
||||||
|
|
|
@ -192,8 +192,6 @@ static struct urb *simple_alloc_urb (
|
||||||
{
|
{
|
||||||
struct urb *urb;
|
struct urb *urb;
|
||||||
|
|
||||||
if (bytes < 0)
|
|
||||||
return NULL;
|
|
||||||
urb = usb_alloc_urb (0, GFP_KERNEL);
|
urb = usb_alloc_urb (0, GFP_KERNEL);
|
||||||
if (!urb)
|
if (!urb)
|
||||||
return urb;
|
return urb;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче