Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 340901
b: refs/heads/master
c: 264e989
h: refs/heads/master
i:
  340899: 7b0eba0
v: v3
  • Loading branch information
Dan Carpenter authored and John W. Linville committed Oct 19, 2012
1 parent 820a80b commit f2bcc7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2b4766c3008aa99a60415a6f321ac0dad94852f1
refs/heads/master: 264e989a0b347c61bd3258063eac8b86f55ff037
9 changes: 4 additions & 5 deletions trunk/drivers/net/wireless/orinoco/orinoco_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ static int ezusb_firmware_download(struct ezusb_priv *upriv,
static int ezusb_access_ltv(struct ezusb_priv *upriv,
struct request_context *ctx,
u16 length, const void *data, u16 frame_type,
void *ans_buff, int ans_size, u16 *ans_length)
void *ans_buff, unsigned ans_size, u16 *ans_length)
{
int req_size;
int retval = 0;
Expand Down Expand Up @@ -933,7 +933,7 @@ static int ezusb_access_ltv(struct ezusb_priv *upriv,
}
if (ctx->in_rid) {
struct ezusb_packet *ans = ctx->buf;
int exp_len;
unsigned exp_len;

if (ans->hermes_len != 0)
exp_len = le16_to_cpu(ans->hermes_len) * 2 + 12;
Expand All @@ -949,8 +949,7 @@ static int ezusb_access_ltv(struct ezusb_priv *upriv,
}

if (ans_buff)
memcpy(ans_buff, ans->data,
min_t(int, exp_len, ans_size));
memcpy(ans_buff, ans->data, min(exp_len, ans_size));
if (ans_length)
*ans_length = le16_to_cpu(ans->hermes_len);
}
Expand Down Expand Up @@ -995,7 +994,7 @@ static int ezusb_read_ltv(struct hermes *hw, int bap, u16 rid,
struct ezusb_priv *upriv = hw->priv;
struct request_context *ctx;

if ((bufsize < 0) || (bufsize % 2))
if (bufsize % 2)
return -EINVAL;

ctx = ezusb_alloc_ctx(upriv, rid, rid);
Expand Down

0 comments on commit f2bcc7d

Please sign in to comment.