Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bbc_i2c: Remove unneeded err variable

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Axel Lin and committed by
David S. Miller
e4104710 f0a4cf31

+4 -10
+4 -10
drivers/sbus/char/bbc_i2c.c
··· 233 233 int ret = 0; 234 234 235 235 while (len > 0) { 236 - int err = bbc_i2c_writeb(client, *buf, off); 237 - 238 - if (err < 0) { 239 - ret = err; 236 + ret = bbc_i2c_writeb(client, *buf, off); 237 + if (ret < 0) 240 238 break; 241 - } 242 - 243 239 len--; 244 240 buf++; 245 241 off++; ··· 249 253 int ret = 0; 250 254 251 255 while (len > 0) { 252 - int err = bbc_i2c_readb(client, buf, off); 253 - if (err < 0) { 254 - ret = err; 256 + ret = bbc_i2c_readb(client, buf, off); 257 + if (ret < 0) 255 258 break; 256 - } 257 259 len--; 258 260 buf++; 259 261 off++;