Wind River Support Network

HomeDefectsLIN6-4509
Not to be fixed

LIN6-4509 : a wrong use of the return value of a funtion

Created: May 30, 2013    Updated: Apr 19, 2018
Resolved Date: Apr 17, 2018
Previous ID: LIN4-7240
Found In Version: 6.0
Severity: Critical
Applicable for: Wind River Linux 6
Component/s: BSP

Description

 * When this returns zero, the specified adapter became available for
 * clients using the bus number provided in adap->nr.  Also, the table
 * of I2C devices pre-declared using i2c_register_board_info() is scanned,
 * and the appropriate driver model device nodes are created.  Otherwise, a
 * negative errno value is returned.
 */
i2c_add_numbered_adapter()

Steps to Reproduce

1 >   $ /mnt/new-disk-1/WindRiver4.3/wrlinux-4/wrlinux/../ldat/configure
> --enable-board=nlm_xlp_64_be --enable-build=production 
> --enable-kernel=standard --enable-rootfs=glibc_small+debug+demo 
> --with-template=feature/gdb 
> --with-product-dir=/mnt/new-disk-1/WindRiver4.3/wrlinux-4/wrlinux
2 ci2c_xlp_probe() in driver/i2c/busses/i2c-xlp.c


ret = i2c_add_numbered_adapter()
if ( !ret ){
i2c_xlp_disable();
goto out;
}
Live chat
Online