From patchwork Fri Jun 30 11:06:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 698396 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 E92D0EB64D7 for ; Fri, 30 Jun 2023 11:08:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230013AbjF3LI0 (ORCPT ); Fri, 30 Jun 2023 07:08:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232301AbjF3LIN (ORCPT ); Fri, 30 Jun 2023 07:08:13 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C46C53AAB for ; Fri, 30 Jun 2023 04:07:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688123244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qkAExNhpijKNG0m31GTF805aVMxzHAvMEggGBzh7744=; b=GCtWPlJHdB2ubK6bAHVIAQSOep8tiC6qoJEiwwVC5GeKl8Rq8/oBt73kUsCswf+1V8jF6o dCuzP8+L817UJC/dkJDgC2gZLMh8QVit7rtSnRIJB+J+kxGA+yXHZYDtTJbwzZzpdk6WmO COmg2TBnznCUaDlW3BHS0U94WRc32tE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-38-isRRxZoXNOWsyxX-1-HdQA-1; Fri, 30 Jun 2023 07:07:20 -0400 X-MC-Unique: isRRxZoXNOWsyxX-1-HdQA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EEEB818E6C44; Fri, 30 Jun 2023 11:07:18 +0000 (UTC) Received: from shalem.redhat.com (unknown [10.39.193.184]) by smtp.corp.redhat.com (Postfix) with ESMTP id 867A2492B02; Fri, 30 Jun 2023 11:07:17 +0000 (UTC) From: Hans de Goede To: Sakari Ailus , Laurent Pinchart , Daniel Scally Cc: Hans de Goede , Mauro Carvalho Chehab , Andy Shevchenko , Kate Hsuan , Hao Yao , Bingbu Cao , linux-media@vger.kernel.org Subject: [PATCH v2 09/15] media: ipu-bridge: Drop early setting of sensor->adev Date: Fri, 30 Jun 2023 13:06:37 +0200 Message-ID: <20230630110643.209761-10-hdegoede@redhat.com> In-Reply-To: <20230630110643.209761-1-hdegoede@redhat.com> References: <20230630110643.209761-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org sensor->adev is no longer dereferenced before it is permanently set by: sensor->adev = acpi_dev_get(adev); So the early assignment with a borrowed reference can be dropped. Signed-off-by: Hans de Goede --- drivers/media/pci/intel/ipu-bridge.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c index daa9dde78c64..891dc0b7c960 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -342,11 +342,6 @@ static int ipu_bridge_connect_sensor(const struct ipu_sensor_config *cfg, } sensor = &bridge->sensors[bridge->n_sensors]; - /* - * Borrow our adev ref to the sensor for now, on success - * acpi_dev_get(adev) is done further below. - */ - sensor->adev = adev; ret = ipu_bridge_parse_ssdb(adev, sensor); if (ret)