From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C24A5405F7 for ; Fri, 16 Jan 2026 07:50:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768549821; cv=none; b=qG+CEkLBxQkHpnt7eOiyX4PbqgXs17idZ5rLS0XiBN5z1yR85sqLqC/01oDAgCM/RiDsm7WIdexLBfe9uBhcb6ZXHGELHIH/QN8Gd1hE8yBDMRqDZpTZCGecEd9igIKhRjjfCQq0b206lMEaUaN00IutDd3qnhlv48ZS44bHSd8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768549821; c=relaxed/simple; bh=9lO4agH7OxnBStYHfSLw7UyZJ4tXonqIqoF+sWgDzlU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cXESrbbn8vBBLCFrctGBXBTRRisDw1zzbfpE+kEoViUQ4nA5kRnkz8OS9eqWgctpseKbP1kZLID1yP4qWRRYGXtCxVtQA+ZtGnhnFhPLukN7zkm8Hr205KGrGxWn/VI2QfA58/gH2qwrPeY6BRP7ir37cIi+I+J3iJHcl24OARA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=TeblgObi; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="TeblgObi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15740C19421; Fri, 16 Jan 2026 07:50:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1768549821; bh=9lO4agH7OxnBStYHfSLw7UyZJ4tXonqIqoF+sWgDzlU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TeblgObiZSW5L70PPhrEyVjkEO4Jc1soIznM6yUVqOhZqGrtI32r3iT29qtf9FF2l LnOtl6U/vx38U/iAidBE0+Hz3xS7vjCqAV5gENGitUsmOmTMpBB4FUlXOWNrtAWJKC +CPViaivltRXlvcyAEn0Z/SfSwrNCoO8GJZ5qQUg= Date: Fri, 16 Jan 2026 08:50:18 +0100 From: Greg Kroah-Hartman To: Dave Penkler Cc: Dominik Karol Pi??tkowski , Michael Rubin , Dan Carpenter , linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/9] gpib: cec: Unify *allocate_private Message-ID: <2026011647-enigmatic-earwig-5db5@gregkh> References: <20260113190759.54355-1-dominik.karol.piatkowski@protonmail.com> <20260113190759.54355-4-dominik.karol.piatkowski@protonmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Jan 15, 2026 at 05:29:44PM +0100, Dave Penkler wrote: > On Tue, Jan 13, 2026 at 07:08:56PM +0000, Dominik Karol Pi??tkowski wrote: > > Return values for *allocate_private functions as well as calling code in > > gpib driver are all over the place. Unify them by returning -errno if > > something fails, zero otherwise. Use the returned value as early return > > value in case of error. > > > > Signed-off-by: Dominik Karol Pi??tkowski > > --- > > drivers/gpib/cec/cec_gpib.c | 8 +++++--- > > 1 file changed, 5 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/gpib/cec/cec_gpib.c b/drivers/gpib/cec/cec_gpib.c > > index dbf9b95baabc..6d04becd1058 100644 > > --- a/drivers/gpib/cec/cec_gpib.c > > +++ b/drivers/gpib/cec/cec_gpib.c > > @@ -222,7 +222,7 @@ static int cec_allocate_private(struct gpib_board *board) > > > > board->private_data = kmalloc(sizeof(struct cec_priv), GFP_KERNEL); > > Maybe you could change all the remaining kmalloc/memset pairs to kzalloc at the same time ? That's a different logical change, and should be in a different patch, just to ensure that it is easier to review and roll back if something went wrong. thanks, greg k-h