From patchwork Thu Sep 1 09:46:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 602042 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 8B938ECAAD3 for ; Thu, 1 Sep 2022 09:47:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233834AbiIAJrZ (ORCPT ); Thu, 1 Sep 2022 05:47:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233925AbiIAJrQ (ORCPT ); Thu, 1 Sep 2022 05:47:16 -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 11D7112487F for ; Thu, 1 Sep 2022 02:47:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662025635; 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=IEAI9KHfek7RN/C4xU1FNFkJEMFJUTHd1T9ANa6t+P0=; b=YSpl1ZztqPnQMT1FlrMidC5rsvknZ9/B1CYHcnQ5rTbevSQe7wCpt41dpuvZB3sSCXcCKb BKfcWk3JglDLFx/KE0QSneB0p/poHnUY0DayrRScsd5iMtFhLzq4qSbMXJ3OWJ53c5FEQY 4NvGpfDIN5U87X4jbnE2PZa9pvOdsP0= 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-288-X3Pw-QBdPoSuTphM19D-Vg-1; Thu, 01 Sep 2022 05:47:10 -0400 X-MC-Unique: X3Pw-QBdPoSuTphM19D-Vg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9ACC690F94C; Thu, 1 Sep 2022 09:47:00 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.195.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id E4B9D492C3B; Thu, 1 Sep 2022 09:46:58 +0000 (UTC) From: Hans de Goede To: Mauro Carvalho Chehab , Sakari Ailus Cc: Hans de Goede , Tsuchiya Yuto , Andy Shevchenko , Yury Luneff , Nable , andrey.i.trufanov@gmail.com, Fabio Aiuto , linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH 13/14] media: atomisp: Simplify v4l2_fh_open() error handling Date: Thu, 1 Sep 2022 11:46:25 +0200 Message-Id: <20220901094626.11513-14-hdegoede@redhat.com> In-Reply-To: <20220901094626.11513-1-hdegoede@redhat.com> References: <20220901094626.11513-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org v4l2_fh_open() can only fail with -ENOMEM and as a generic rule drivers do not log their own errors for -ENOMEM since the kernel will already have complained loudly about this before the -ENOMEM return. Remove the unnecessary error logging from atomisp_open(). Signed-off-by: Hans de Goede --- drivers/staging/media/atomisp/pci/atomisp_fops.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_fops.c b/drivers/staging/media/atomisp/pci/atomisp_fops.c index 61571f3fb060..fa37defa5ecc 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_fops.c +++ b/drivers/staging/media/atomisp/pci/atomisp_fops.c @@ -708,12 +708,8 @@ static int atomisp_open(struct file *file) dev_dbg(isp->dev, "open device %s\n", vdev->name); ret = v4l2_fh_open(file); - if (ret) { - dev_err(isp->dev, - "%s: v4l2_fh_open() returned error %d\n", - __func__, ret); + if (ret) return ret; - } rt_mutex_lock(&isp->mutex);