summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ar5523/ar5523.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ar5523/ar5523.c')
-rw-r--r--drivers/net/wireless/ath/ar5523/ar5523.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ar5523/ar5523.c b/drivers/net/wireless/ath/ar5523/ar5523.c
index b94759daeacc..da2d179430ca 100644
--- a/drivers/net/wireless/ath/ar5523/ar5523.c
+++ b/drivers/net/wireless/ath/ar5523/ar5523.c
@@ -255,7 +255,8 @@ static int ar5523_cmd(struct ar5523 *ar, u32 code, const void *idata,
if (flags & AR5523_CMD_FLAG_MAGIC)
hdr->magic = cpu_to_be32(1 << 24);
- memcpy(hdr + 1, idata, ilen);
+ if (ilen)
+ memcpy(hdr + 1, idata, ilen);
cmd->odata = odata;
cmd->olen = olen;