Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy: stm32: use NULL instead of zero

devm_clk_get() and devm_reset_control_get() expect a const char *id for
the last arg, but a value of zero was provided. This results in below
sparse warning:

drivers/phy/st/phy-stm32-usbphyc.c:330:42: warning: Using plain integer as NULL pointer
drivers/phy/st/phy-stm32-usbphyc.c:343:52: warning: Using plain integer as NULL pointer

Instead of zero, use NULL

Reviewed-by: Amelie Delaunay <amelie.delaunay@st.com>
Link: https://lore.kernel.org/r/20200708132809.265967-6-vkoul@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>

+2 -2
+2 -2
drivers/phy/st/phy-stm32-usbphyc.c
··· 327 327 if (IS_ERR(usbphyc->base)) 328 328 return PTR_ERR(usbphyc->base); 329 329 330 - usbphyc->clk = devm_clk_get(dev, 0); 330 + usbphyc->clk = devm_clk_get(dev, NULL); 331 331 if (IS_ERR(usbphyc->clk)) { 332 332 ret = PTR_ERR(usbphyc->clk); 333 333 dev_err(dev, "clk get failed: %d\n", ret); ··· 340 340 return ret; 341 341 } 342 342 343 - usbphyc->rst = devm_reset_control_get(dev, 0); 343 + usbphyc->rst = devm_reset_control_get(dev, NULL); 344 344 if (!IS_ERR(usbphyc->rst)) { 345 345 reset_control_assert(usbphyc->rst); 346 346 udelay(2);