* [bug report] phy: stm32: add support for STM32 USB PHY Controller (USBPHYC)
@ 2018-03-20 12:14 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2018-03-20 12:14 UTC (permalink / raw)
To: linux-arm-kernel
Hello Amelie Delaunay,
The patch 94c358da3a05: "phy: stm32: add support for STM32 USB PHY
Controller (USBPHYC)" from Mar 2, 2018, leads to the following static
checker warning:
drivers/phy/st/phy-stm32-usbphyc.c:371 stm32_usbphyc_probe()
error: uninitialized symbol 'i'.
drivers/phy/st/phy-stm32-usbphyc.c
360 for_each_child_of_node(np, child) {
361 struct stm32_usbphyc_phy *usbphyc_phy;
362 struct phy *phy;
363 u32 index;
364 int i;
^^^^^
365
366 phy = devm_phy_create(dev, child, &stm32_usbphyc_phy_ops);
367 if (IS_ERR(phy)) {
368 ret = PTR_ERR(phy);
369 if (ret != -EPROBE_DEFER)
370 dev_err(dev,
371 "failed to create phy%d: %d\n", i, ret);
^
372 goto put_child;
373 }
374
375 usbphyc_phy = devm_kzalloc(dev, sizeof(*usbphyc_phy),
376 GFP_KERNEL);
377 if (!usbphyc_phy) {
378 ret = -ENOMEM;
379 goto put_child;
380 }
381
382 for (i = 0; i < NUM_SUPPLIES; i++)
383 usbphyc_phy->supplies[i].supply = supplies_names[i];
384
385 ret = devm_regulator_bulk_get(&phy->dev, NUM_SUPPLIES,
386 usbphyc_phy->supplies);
387 if (ret) {
388 if (ret != -EPROBE_DEFER)
389 dev_err(&phy->dev,
390 "failed to get regulators: %d\n", ret);
391 goto put_child;
392 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-03-20 12:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-20 12:14 [bug report] phy: stm32: add support for STM32 USB PHY Controller (USBPHYC) Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.