linux-3.15-rc5/arch/arm/mach-omap1/board-sx1.c:89: possible missing function call return value check ?

Bug #1321855 reported by dcb
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro
New
Undecided
Unassigned

Bug Description

[linux-3.15-rc5/arch/arm/mach-omap1/board-sx1.c:89] -> [linux-3.15-rc5/arch/arm/mach-omap1/board-sx1
.c:95]: (performance) Variable 'err' is reassigned a value before the old one has been used.

Source code is

    err = i2c_transfer(adap, msg, 1);

    msg->addr = devaddr; /* I2C address */
    msg->flags = I2C_M_RD;
    msg->len = 1;
    msg->buf = data;
    err = i2c_transfer(adap, msg, 1);

Suggest sanity check value of 'err' after first assignment.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.