From patchwork Tue May 10 11:58:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 571449 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 A88B7C433F5 for ; Tue, 10 May 2022 11:59:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241475AbiEJMDv (ORCPT ); Tue, 10 May 2022 08:03:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241477AbiEJMDu (ORCPT ); Tue, 10 May 2022 08:03:50 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 706B353B52 for ; Tue, 10 May 2022 04:59:53 -0700 (PDT) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 310FF1A49; Tue, 10 May 2022 13:59:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1652183977; bh=uk7QSLv2qM0UlTKkUT4qWhdMuv+9FNoxBd4UtAMVX14=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ooWVWNX4AZouZLaGEJvdu9lAWJSs2gn6SYef0e52FVY33QHFIVoMuG+UmPAX8vLVg X9VCgYd8e1uw/7CC6ar6nl/L+iJIrfk3yrK9Hm0c3MYOs1NBBHSx7wsM9Yi+E8UBs1 gzMD8TdsTMX3PwoOH3CkKfMIN5CvMLK4P708X2+M= From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: Rui Miguel Silva , Steve Longerbeam , Philipp Zabel , Jacopo Mondi , Martin Kepplinger , Alexander Stein , Dorota Czaplejewicz , kernel@pengutronix.de Subject: [PATCH 32/50] staging: media: imx: imx7-media-csi: Drop error message on alloc failure Date: Tue, 10 May 2022 14:58:41 +0300 Message-Id: <20220510115859.19777-33-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220510115859.19777-1-laurent.pinchart@ideasonboard.com> References: <20220510115859.19777-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The kernel memory allocators already complain loudly to the log when allocation fails. There's no need for an additional message. Signed-off-by: Laurent Pinchart --- drivers/staging/media/imx/imx7-media-csi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c index 2106a72ebe85..e5dc9525fa52 100644 --- a/drivers/staging/media/imx/imx7-media-csi.c +++ b/drivers/staging/media/imx/imx7-media-csi.c @@ -442,10 +442,8 @@ static int imx7_csi_alloc_dma_buf(struct imx7_csi *csi, buf->len = PAGE_ALIGN(size); buf->virt = dma_alloc_coherent(csi->dev, buf->len, &buf->phys, GFP_DMA | GFP_KERNEL); - if (!buf->virt) { - dev_err(csi->dev, "%s: failed\n", __func__); + if (!buf->virt) return -ENOMEM; - } return 0; }