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 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(-) diff --git a/drivers/usb/phy/phy-fsl-usb.c b/drivers/usb/phy/phy-fsl-usb.c index 1986f7e9d..110b277aa 100644 --- a/drivers/usb/phy/phy-fsl-usb.c +++ b/drivers/usb/phy/phy-fsl-usb.c @@ -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, -- Felix Huang <[email protected]>
