powerpc/fsl: fix compiler warning in fsl_wakeup_sys_init()
Commit c93bd175 ("powerpc/fsl: move to use bus_get_dev_root()") changed to use bus_get_dev_root() but didn't consider that the function can fail and return an uninitialized value of ret (hint, the function can never fail, but the compiler doesn't know that.) Fix this up by setting ret to -EINVAL just in case something really goes wrong with the call to bus_get_dev_root(). Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: linuxppc-dev@lists.ozlabs.org Fixes: c93bd175 ("powerpc/fsl: move to use bus_get_dev_root()") Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/oe-kbuild-all/202303280045.4oaaezcn-lkp@intel.com/Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20230327181606.1424846-1-gregkh@linuxfoundation.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
Please register or sign in to comment