From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751730AbdITJNN (ORCPT ); Wed, 20 Sep 2017 05:13:13 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:38979 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751685AbdITJNL (ORCPT ); Wed, 20 Sep 2017 05:13:11 -0400 Date: Wed, 20 Sep 2017 12:12:50 +0300 From: Dan Carpenter To: SF Markus Elfring Cc: linux-media@vger.kernel.org, Hans Verkuil , Mauro Carvalho Chehab , LKML , kernel-janitors@vger.kernel.org Subject: Re: [PATCH 4/6] [media] go7007: Use common error handling code in s2250_probe() Message-ID: <20170920091250.rmrdilesv754sddi@mwanda> References: <20170919084216.ctvwpmswr3ckhwzc@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 20, 2017 at 09:09:16AM +0200, SF Markus Elfring wrote: > >> @@ -555,17 +553,13 @@ static int s2250_probe(struct i2c_client *client, > >> /* initialize the audio */ > >> if (write_regs(audio, aud_regs) < 0) { > >> dev_err(&client->dev, "error initializing audio\n"); > >> - goto fail; > >> + goto e_io; > > > > Preserve the error code. > > Do you suggest then to adjust the implementation of the function "write_regs" > so that a more meaningful value would be used instead of the failure indication "-1"? > If you want to, yeah, that would be good. regards, dan carpenter