usb: phy: fsl-usb: use NULL instead of plain integer 0
Subsystems (2)
PATCH 1/1 usb: phy: fsl-usb: use NULL instead of plain integer 0
Fix the following sparse warning in fsl_otg_set_peripheral():
drivers/usb/phy/phy-fsl-usb.c:618:31: warning: Using plain integer as NULL pointer
Assign NULL instead of 0 to the struct usb_gadget pointer otg->gadget.
Signed-off-by Felix Huang <[email protected]>
--- drivers/usb/phy/phy-fsl-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/phy/phy-fsl-usb.c +1 -1
@@ -615,7 +615,7 @@ static int fsl_otg_set_peripheral(struct usb_otg *otg,if (!otg->default_a) otg->gadget->ops->vbus_draw (otg->gadget,0 );usb_gadget_vbus_disconnect (otg->gadget); - otg->gadget =0 ; + otg->gadget =NULL ; otg_dev->fsm.b_bus_req =0 ;otg_statemachine (&otg_dev->fsm);return 0 ;
---
base-commit: f4585067150b85e33f60876149a6e742928da75e
change-id: 20261127-fsl-usb-null-pointer-fbb14806a3b0
Best regards,
Signature · 1 line
Felix Huang <[email protected]>
[email protected]
AI reviewSashiko has reviewed this patch and found no issues.
Quoted 9 lines
From: Felix Huang <[email protected]>
Fix the following sparse warning in
fsl_otg_set_peripheral():
drivers/usb/phy/phy-fsl-usb.c:618:31: warning: Using plain integer as NULL pointerAssign NULL instead of 0 to the struct
usb_gadgetpointerotg->gadget.Signed-off-by Felix Huang <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1