• Arnd Bergmann's avatar
    xen-netback: fix error handling output · 0f06ac3b
    Arnd Bergmann authored
    The connect function prints an unintialized error code after an
    earlier initialization was removed:
    
    drivers/net/xen-netback/xenbus.c: In function 'connect':
    drivers/net/xen-netback/xenbus.c:938:3: error: 'err' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    
    This prints it as -EINVAL instead, which seems to be the most
    appropriate error code. Before the patch that caused the warning,
    this would print a positive number returned by vsscanf() instead,
    which is also wrong. We probably don't need a backport though,
    as fixing the warning here should be sufficient.
    
    Fixes: f95842e7 ("xen: make use of xenbus_read_unsigned() in xen-netback")
    Fixes: 8d3d53b3 ("xen-netback: Add support for multiple queues")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Reviewed-by: default avatarPaul Durrant <paul.durrant@citrix.com>
    Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
    0f06ac3b
xenbus.c 29.6 KB