Commit c8a03943 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Lee Jones
Browse files

leds: ns2: Slightly simplify a memory allocation

parent 3192f141
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -247,7 +247,7 @@ static int ns2_led_probe(struct platform_device *pdev)
	if (!count)
		return -ENODEV;

	leds = devm_kzalloc(dev, array_size(sizeof(*leds), count), GFP_KERNEL);
	leds = devm_kcalloc(dev, count, sizeof(*leds), GFP_KERNEL);
	if (!leds)
		return -ENOMEM;