clk: ingenic/jz4770: Exit with error if CGU init failed
authorPaul Cercueil <paul@crapouillou.net>
Thu, 13 Feb 2020 16:19:51 +0000 (13:19 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Apr 2020 14:12:16 +0000 (16:12 +0200)
commitbb863cc1a58a3f16e24c24cf4ca4f35cbe3c9e27
treea0c82a91172cac82dbadf22ca905fbbf0d6b0af6
parent22cd5380ec939b9113405505a2f4d46427f33607
clk: ingenic/jz4770: Exit with error if CGU init failed

commit c067b46d731a764fc46ecc466c2967088c97089e upstream.

Exit jz4770_cgu_init() if the 'cgu' pointer we get is NULL, since the
pointer is passed as argument to functions later on.

Fixes: 7a01c19007ad ("clk: Add Ingenic jz4770 CGU driver")
Cc: stable@vger.kernel.org
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lkml.kernel.org/r/20200213161952.37460-1-paul@crapouillou.net
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/clk/ingenic/jz4770-cgu.c