[PATCH] clk: at91: Fix a return value in case of error

2016-09-24 Thread Christophe JAILLET
If 'clk_hw_register()' fails, it is likely that we expect to return an error instead of a valid pointer (which would mean success). 'clk_hw_register()' returns a bool, so we don't have the detail of the error. Return -ENOMEM instead, as it seems to be the most common error returned by

[PATCH] clk: at91: Fix a return value in case of error

2016-09-24 Thread Christophe JAILLET
If 'clk_hw_register()' fails, it is likely that we expect to return an error instead of a valid pointer (which would mean success). 'clk_hw_register()' returns a bool, so we don't have the detail of the error. Return -ENOMEM instead, as it seems to be the most common error returned by