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
parent
b2e7c737f9
commit
d0430a4914
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue