Re: [RFC 2/2] staging: android: ion: Add of_ion_device_get function
From: Dan Carpenter
Date: Wed Mar 23 2016 - 01:08:18 EST
On Tue, Mar 22, 2016 at 03:33:51PM -0700, Moritz Fischer wrote:
> +struct ion_device *of_ion_device_get(struct device_node *node)
> +{
> + struct miscdevice *mdev = of_misc_get(node);
> +
> + if (IS_ERR(mdev))
> + return ERR_PTR(PTR_ERR(mdev));
Use ERR_CAST() for this.
regarda,
dan carpenter