Re: [PATCH v2 2/2] leds: spi-byte: add single byte SPI LED driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

> >+	led = devm_kzalloc(dev, sizeof(*led), GFP_KERNEL);
> >+	if (!led)
> >+		return -ENOMEM;
> >+
> >+	led->spi = spi;
> >+	strlcpy(led->name, name, sizeof(led->name));
> >+	mutex_init(&led->mutex);
> >+	led->off_value = off_value;
> >+	led->max_value = max_value;
> >+	led->ldev.name = led->name;
> >+	led->ldev.brightness = LED_OFF;
> 
> This line is redundant - already zeroed by kzalloc.

Actually I'd prefer to leave it in. Yes, LED_OFF == 0, and will
probably stay == 0 in future, but...
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux