[PATCH 10/10] hwmon: vexpress: Use devm helper for hwmon device registration

Pawel Moll pawel.moll at arm.com
Wed Apr 30 08:33:58 PDT 2014


On Wed, 2014-04-30 at 16:27 +0100, Guenter Roeck wrote:
> > I'm not sure I understand the question. The other patch from the series
> 
> The code above seems to change from
> 
>    	data->reg = devm_regmap_init_vexpress_config(&pdev->dev);
> 	if (!data->reg)
> 		return -ENODEV;
> 
> to
> 
>    	data->reg = devm_regmap_init_vexpress_config(&pdev->dev);
> 	if (IS_ERR(data->reg))
> 		return PTR_ERR(data->reg);
> 
> as part of this patch. This suggests that the return value from
> devm_regmap_init_vexpress_config may have changed from NULL to 
> ERR_PTR. Is my understanding wrong ?

No, you've got it right, but it's me making a mistake in patch splitting
- it is supposed to be a part of the first patch. Thanks for spotting
this!

Pawel




More information about the linux-arm-kernel mailing list