1
0
Fork 0

MLK-12928-16 regulator: pf1550: check device node check

Do not probe if the device node is not correct in dts.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
pull/10/head
Robin Gong 2016-10-12 14:53:28 +08:00 committed by Jason Liu
parent b2e7c737f9
commit d0430a4914
1 changed files with 4 additions and 0 deletions

View File

@ -287,10 +287,14 @@ static irqreturn_t pf1550_regulator_irq_handler(int irq, void *data)
static int pf1550_regulator_probe(struct platform_device *pdev)
{
struct pf1550_dev *iodev = dev_get_drvdata(pdev->dev.parent);
struct device_node *np = pdev->dev.of_node;
struct pf1550_regulator_info *info;
int i, ret = 0;
struct regulator_config config = { };
if (!np)
return -ENODEV;
info = devm_kzalloc(&pdev->dev, sizeof(struct pf1550_regulator_info),
GFP_KERNEL);
if (!info)