phy: phy-mvebu-sata: Add missing error check for devm_kzalloc
authorPeter Griffin <peter.griffin@linaro.org>
Fri, 15 Aug 2014 12:40:09 +0000 (13:40 +0100)
committerKishon Vijay Abraham I <kishon@ti.com>
Wed, 24 Sep 2014 09:48:31 +0000 (15:18 +0530)
commit1f8de849cf8399ff287bab560d04df4515ec73c0
tree8400cf883a301832560187933eade98faa8a1e58
parent437a6bc478e6530efad9aeb04b84b2f5c4e356d5
phy: phy-mvebu-sata: Add missing error check for devm_kzalloc

Currently this driver is missing a check on the return value of devm_kzalloc,
which would cause a NULL pointer dereference in a OOM situation.

This patch adds the aformentioned missing check.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/phy-mvebu-sata.c