--- zzzz-none-000/linux-3.10.107/arch/avr32/boards/hammerhead/flash.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/arch/avr32/boards/hammerhead/flash.c 2021-02-04 17:41:59.000000000 +0000 @@ -190,14 +190,19 @@ /* setup gclk0 to run from osc1 */ gclk = clk_get(NULL, "gclk0"); - if (IS_ERR(gclk)) + if (IS_ERR(gclk)) { + ret = PTR_ERR(gclk); goto err_gclk; + } osc = clk_get(NULL, "osc1"); - if (IS_ERR(osc)) + if (IS_ERR(osc)) { + ret = PTR_ERR(osc); goto err_osc; + } - if (clk_set_parent(gclk, osc)) { + ret = clk_set_parent(gclk, osc); + if (ret < 0) { pr_debug("hammerhead: failed to set osc1 for USBH clock\n"); goto err_set_clk; }