linux-4.5-rc4/arch/powerpc/boot/treeboot-akebono.c:90: possible bad test ?

David Binderman dcb314 at hotmail.com
Tue Feb 16 19:15:25 AEDT 2016


hello there,

[linux-4.5-rc4/arch/powerpc/boot/treeboot-akebono.c:90]: (style) A pointer can not be negative so it is either pointless or an error to check if it is not.

Source code is

    emac = finddevice("/plb/opb/ethernet");
    if (emac> 0) {

but

    void *emac;

Suggest new code

    emac = finddevice("/plb/opb/ethernet");
    if (emac != 0) {


Regards

David Binderman
 		 	   		  


More information about the Linuxppc-dev mailing list