From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756601AbcJXKgm (ORCPT ); Mon, 24 Oct 2016 06:36:42 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:37606 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752075AbcJXKgj (ORCPT ); Mon, 24 Oct 2016 06:36:39 -0400 Date: Mon, 24 Oct 2016 13:36:14 +0300 From: Dan Carpenter To: Christophe JAILLET Cc: ssantosh@kernel.org, mturquette@baylibre.com, sboyd@codeaurora.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] clk: keystone: Fix an error checking Message-ID: <20161024103614.GW4469@mwanda> References: <20161023081249.24668-1-christophe.jaillet@wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161023081249.24668-1-christophe.jaillet@wanadoo.fr> 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 On Sun, Oct 23, 2016 at 10:12:49AM +0200, Christophe JAILLET wrote: > clk_register_pll() can return ERR_PTR(-ENOMEM) so here the check against > NULL only is not correct. > Change the ERR_PTR(-ENOMEM) to a NULL instead. When we mix error pointers and NULL, what it means is that NULL should be treated as a success case. That's not the case here, so we should just return NULL since we don't actually care about the error codes. regards, dan carpenter