| .. | .. |
|---|
| 101 | 101 | if (num > i + 1 && (msg[i+1].flags & I2C_M_RD)) { |
|---|
| 102 | 102 | if (msg[i].addr == |
|---|
| 103 | 103 | ce6230_zl10353_config.demod_address) { |
|---|
| 104 | + if (msg[i].len < 1) { |
|---|
| 105 | + i = -EOPNOTSUPP; |
|---|
| 106 | + break; |
|---|
| 107 | + } |
|---|
| 104 | 108 | req.cmd = DEMOD_READ; |
|---|
| 105 | 109 | req.value = msg[i].addr >> 1; |
|---|
| 106 | 110 | req.index = msg[i].buf[0]; |
|---|
| .. | .. |
|---|
| 117 | 121 | } else { |
|---|
| 118 | 122 | if (msg[i].addr == |
|---|
| 119 | 123 | ce6230_zl10353_config.demod_address) { |
|---|
| 124 | + if (msg[i].len < 1) { |
|---|
| 125 | + i = -EOPNOTSUPP; |
|---|
| 126 | + break; |
|---|
| 127 | + } |
|---|
| 120 | 128 | req.cmd = DEMOD_WRITE; |
|---|
| 121 | 129 | req.value = msg[i].addr >> 1; |
|---|
| 122 | 130 | req.index = msg[i].buf[0]; |
|---|