Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751709AbcCWE4I (ORCPT ); Wed, 23 Mar 2016 00:56:08 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:44406 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750716AbcCWE4B (ORCPT ); Wed, 23 Mar 2016 00:56:01 -0400 Date: Wed, 23 Mar 2016 07:55:35 +0300 From: Dan Carpenter To: Moritz Fischer Cc: arnd@arndb.de, gregkh@linuxfoundation.org, arve@android.com, riandrews@android.com, labbott@redhat.com, gioh.kim@lge.com, sumit.semwal@linaro.org, sriram@marirs.net.in, linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org Subject: Re: [RFC 2/2] staging: android: ion: Add of_ion_device_get function Message-ID: <20160323045535.GA5273@mwanda> References: <1458686031-31031-1-git-send-email-moritz.fischer@ettus.com> <1458686031-31031-3-git-send-email-moritz.fischer@ettus.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1458686031-31031-3-git-send-email-moritz.fischer@ettus.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 296 Lines: 12 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