From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Cox Subject: Re: [PATCH -next] tty: of_serial: fix return value check in of_platform_serial_setup() Date: Thu, 1 Nov 2012 14:48:52 +0000 Message-ID: <20121101144852.763ffa6f@bob.linux.org.uk> References: <50928060.3010806@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from mga14.intel.com ([143.182.124.37]:48972 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761748Ab2KAOqx (ORCPT ); Thu, 1 Nov 2012 10:46:53 -0400 In-Reply-To: <50928060.3010806@ti.com> Sender: linux-serial-owner@vger.kernel.org List-Id: linux-serial@vger.kernel.org To: Murali Karicheri Cc: Wei Yongjun , gregkh@linuxfoundation.org, grant.likely@secretlab.ca, rob.herring@calxeda.com, seth.heasley@intel.com, yongjun_wei@trendmicro.com.cn, linux-serial@vger.kernel.org, devicetree-discuss@lists.ozlabs.org > > "clk or clock-frequency not > > defined\n"); > > - return -ENODEV; > > + return PTR_ERR(info->clk); > I think this is wrong. it should return -ENODEV; Returning the clock error at least ensures the real reason for the fail is reported. I think its better to use the PTR_ERR but I'd not class either as wrong. Alan