lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.01.1202061359020.23821@pmeerw.net>
Date:	Mon, 6 Feb 2012 14:09:48 +0100 (CET)
From:	Peter Meerwald <pmeerw@...erw.net>
To:	Ashish Jangam <ashish.jangam@...tcummins.com>
cc:	Lars-Peter Clausen <lars@...afoo.de>, rpurdie@...ys.net,
	linux-kernel@...r.kernel.org,
	David Dajun Chen <Dajun.Chen@...semi.com>
Subject: Re: [PATCH 03/07] LEDS: LED module for DA9052/53 PMIC v1


> +	da9052 = dev_get_drvdata(pdev->dev.parent);
> +	pdata = da9052->dev->platform_data;
> +	if (pdata == NULL) {
> +		dev_err(&pdev->dev, "No platform data\n");
> +		error = -ENODEV;
> +		goto err_mem;
> +	}
> +
> +	pled = pdata->pled;
> +	if (pled == NULL) {
> +		dev_err(&pdev->dev, "Failed no platform data for LED\n");
> +		return -ENOMEM;
> +	}

this should be ENODEV as well, there is no alloc
the message could be improved, e.g. "No platform data for LED"

> +	for (i = 0; i < pled->num_leds; i++) {
> +		led[i].cdev.name = pled->leds[i].name;
> +		led[i].cdev.brightness_set = da9052_led_set;
> +		led[i].cdev.brightness = LED_OFF;
> +		led[i].brightness = LED_OFF;
> +		led[i].led_index = pled->leds[i].flags;
> +		led[i].da9052 = dev_get_drvdata(pdev->dev.parent);
> +		INIT_WORK(&led[i].work, da9052_led_work);
> +
> +		error = led_classdev_register(pdev->dev.parent, &led[i].cdev);
> +		if (error) {
> +			dev_err(&pdev->dev, "Failed to register led %d\n",
> +				led[i].led_index);
> +			goto err_register;
> +		}
> +
> +		error = da9052_set_led_brightness(&led[i]);
> +		if (error) {
> +			dev_err(&pdev->dev, "Unable to init led %d\n",
> +				led[i].led_index);
> +			continue;
> +		}
> +	}
> +	error = da9052_configure_leds(led);
> +	if (error) {
> +		dev_err(&pdev->dev, "Failed to configure GPIO Led,%d\n", error);
> +		goto err_register;
> +	}

Led or led or LED?
Led,%d looks odd, maybe "LED%d"?

-- 

Peter Meerwald
+43-664-2444418 (mobile)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ