From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C654EB64DB for ; Thu, 15 Jun 2023 15:10:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344075AbjFOPK2 (ORCPT ); Thu, 15 Jun 2023 11:10:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345259AbjFOPKO (ORCPT ); Thu, 15 Jun 2023 11:10:14 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A238273C for ; Thu, 15 Jun 2023 08:10:14 -0700 (PDT) X-IronPort-AV: E=McAfee;i="6600,9927,10742"; a="361440163" X-IronPort-AV: E=Sophos;i="6.00,245,1681196400"; d="scan'208";a="361440163" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2023 07:43:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10742"; a="712483782" X-IronPort-AV: E=Sophos;i="6.00,245,1681196400"; d="scan'208";a="712483782" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga002.jf.intel.com with ESMTP; 15 Jun 2023 07:43:45 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1q9oCN-003xsg-1U; Thu, 15 Jun 2023 17:43:43 +0300 Date: Thu, 15 Jun 2023 17:43:43 +0300 From: Andy Shevchenko To: Hans de Goede Cc: Sakari Ailus , Daniel Scally , Mauro Carvalho Chehab , Kate Hsuan , Tommaso Merciai , linux-media@vger.kernel.org Subject: Re: [PATCH v2 27/28] media: ov2680: Read and log sensor revision during probe Message-ID: References: <20230615141349.172363-1-hdegoede@redhat.com> <20230615141349.172363-28-hdegoede@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230615141349.172363-28-hdegoede@redhat.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org On Thu, Jun 15, 2023 at 04:13:48PM +0200, Hans de Goede wrote: > Read and log sensor revision during probe. > > Since this means that the driver will now already log a message on > successful probe drop the "ov2680 init correctly" log message. ... > - ret = cci_read(sensor->regmap, OV2680_REG_CHIP_ID, &chip_id, NULL); > + cci_read(sensor->regmap, OV2680_REG_CHIP_ID, &chip_id, &ret); > + cci_read(sensor->regmap, OV2680_REG_SC_CMMN_SUB_ID, &rev, &ret); > if (ret < 0) { > dev_err(sensor->dev, "failed to read chip id\n"); > return -ENODEV; Even in the original code I don't see justification why the error code should be shadowed. -- With Best Regards, Andy Shevchenko