]> git.baikalelectronics.ru Git - kernel.git/commit
mfd: wm97xx-core: Platform data can be NULL
authorRobert Jarzmik <robert.jarzmik@free.fr>
Sun, 3 Jun 2018 20:16:17 +0000 (22:16 +0200)
committerLee Jones <lee.jones@linaro.org>
Mon, 11 Jun 2018 08:11:03 +0000 (09:11 +0100)
commit41313e9fa9fa9d3fe9064b88741de0946da45139
tree2e378e566d07e99fe3f5daceaef9a20df81ba3b0
parentab737d133a6dd168bce364f7f1fb7b9788480825
mfd: wm97xx-core: Platform data can be NULL

It is not mandatory that platform data is passed along the ac97
codec. Actually there are configuration without a battery connected to
the ADC of the codec.

This is for example the case for the PXA zylonite platform, so fix the
NULL dereferencing by adding a test.

Fixes: 3bf52da69cec ("mfd: wm97xx-core: core support for wm97xx Codec")
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/wm97xx-core.c