Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756213AbbDVMMa (ORCPT ); Wed, 22 Apr 2015 08:12:30 -0400 Received: from sym2.noone.org ([178.63.92.236]:39603 "EHLO sym2.noone.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751055AbbDVMM1 (ORCPT ); Wed, 22 Apr 2015 08:12:27 -0400 Date: Wed, 22 Apr 2015 14:12:19 +0200 From: Tobias Klauser To: David Herrmann Cc: Greg Kroah-Hartman , Daniel Mack , David Herrmann , Djalal Harouni , linux-kernel Subject: Re: [PATCH] kdbus: Make kdbus_bus_unref() return void Message-ID: <20150422121219.GC17830@distanz.ch> References: <1429703454-27256-1-git-send-email-tklauser@distanz.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Editor: Vi IMproved 7.3 User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1001 Lines: 23 On 2015-04-22 at 14:01:05 +0200, David Herrmann wrote: > Hi > > On Wed, Apr 22, 2015 at 1:50 PM, Tobias Klauser wrote: > > kdbus_bus_unref() always returns NULL and none of its callers use the > > return value, so make it return void. > > > > Signed-off-by: Tobias Klauser > > All our destructors return NULL, which allows simple assignment during > destruction: > foo->bus = kdbus_bus_unref(foo->bus); > And our destructors ignore NULL, so no reason to conditionalize the > call to unref(). This simplifies our error-paths a lot, and I'd like > to keep it that way. Thanks for the explanation. I didn't consider this - and didn't even look at the other *_unref() for that matter :( -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/