usb: gadget: tegra-xudc: Avoid GFP_ATOMIC where it is not needed
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 9 Aug 2020 07:29:48 +0000 (09:29 +0200)
committerFelipe Balbi <balbi@kernel.org>
Fri, 2 Oct 2020 06:57:43 +0000 (09:57 +0300)
There is no need to use GFP_ATOMIC here. It is a probe function, no
spinlock is taken.

Reviewed-by: JC Kuo <jckuo@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/gadget/udc/tegra-xudc.c

index d6ff68c..9aa4815 100644 (file)
@@ -3733,7 +3733,7 @@ static int tegra_xudc_probe(struct platform_device *pdev)
        unsigned int i;
        int err;
 
-       xudc = devm_kzalloc(&pdev->dev, sizeof(*xudc), GFP_ATOMIC);
+       xudc = devm_kzalloc(&pdev->dev, sizeof(*xudc), GFP_KERNEL);
        if (!xudc)
                return -ENOMEM;