clk: vexpress: NULL dereference on error path
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 7 Nov 2013 08:08:44 +0000 (08:08 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jun 2014 20:25:35 +0000 (13:25 -0700)
commitc4f3c998c17e31c73c1ab223469435a12358d25e
tree00ecda1daead0a30aa00b366e1c47aed50a8a499
parentd2157c29092990941b82488a3653d95fc9e2cb7a
clk: vexpress: NULL dereference on error path

commit 6b4ed8b00e93bd31f24a25f59ed8d1b808d0cc00 upstream.

If the allocation fails then we dereference the NULL in the error path.
Just return directly.

Fixes: ed27ff1db869 ('clk: Versatile Express clock generators ("osc") driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/clk/versatile/clk-vexpress-osc.c