Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp812257pxb; Fri, 22 Apr 2022 11:41:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9NV22njoOgXjBoEYX+tbPRnMuBaR2Z5dtlcHgPHLMuhJh/qFmFC/nsExw5FgwmqQnxUeU X-Received: by 2002:a17:90a:4417:b0:1ca:a861:3fbf with SMTP id s23-20020a17090a441700b001caa8613fbfmr17842577pjg.80.1650652887464; Fri, 22 Apr 2022 11:41:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650652887; cv=none; d=google.com; s=arc-20160816; b=xySZgUQ4NsGnsGnJhkwpKY3PgPaaCvojmgP8SKfiU1neCv6QvtbVp50JhhIlo5GqmB IiQH93wOTrw7VNzh48EBznXKXNxDqcDX19uVUGfz3lUxrxUg9KW8zHqxyi1CeHkQV/kz 654NeIsi9wiGZHZH8Ahe1J+Jo70q4iPb+BG/mfR0Jq1rOq5rF/AvGMzoh1wc/EkGaDhd xpDiC1IUY+W9D8k5cv3XmCZFPj6zBH7oiBtMvCPcCYLn5dGU1jEtuVZz9SyLzfMLjiOc Wfrz2lmLQEea/L4E3opGWkL6JunVEMGRl4rBMziJGdQH7Wmx/2l3nUvoUEChL9j5QyTa v1Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=5buYcEcG6VYbWheXVBThX3baP0fDAa55Yp14/KRCKeg=; b=dYoYuyrLKEsUPH2HWdDDHeKFBhVAm4bcx/qCr8DjSW4c2vrzllgQIkbdRsHWVQotwT WG8cKLyLW4ePFs+F5z8/0SoTbfAmpAG8vEGylWBRT1eMuqeViO7IAKeGAevinzV4qkyF V+O0fLhK0az3J0uGb4ycgtNmndwvfLA0OcJR1vSpfFRNt+8lCUiYZQfsJdjHj66k9ZUK hZsuqPiyMCfabsEy73QKPt3akWKmDRtYKAPNScLIPlMJGcMaKDjKNuQLKobu6epz21fQ nVE5le17+rofjjZEnevCBjYOFMb5rqr8CU88T16Krlnjt+H+qoQ2HSstjdF3QFPN5K8q Oq4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d5-20020a170903230500b00153b2d164aasi926184plh.178.2022.04.22.11.41.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 11:41:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1C42A111C8B; Fri, 22 Apr 2022 11:10:34 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442674AbiDVGJv (ORCPT + 99 others); Fri, 22 Apr 2022 02:09:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbiDVGJr (ORCPT ); Fri, 22 Apr 2022 02:09:47 -0400 Received: from mail.meizu.com (unknown [14.29.68.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEE763CA63; Thu, 21 Apr 2022 23:06:51 -0700 (PDT) Received: from IT-EXMB-1-125.meizu.com (172.16.1.125) by mz-mail04.meizu.com (172.16.1.16) with Microsoft SMTP Server (TLS) id 14.3.487.0; Fri, 22 Apr 2022 14:06:53 +0800 Received: from meizu.meizu.com (172.16.137.70) by IT-EXMB-1-125.meizu.com (172.16.1.125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.14; Fri, 22 Apr 2022 14:06:48 +0800 From: Haowen Bai To: Mauro Carvalho Chehab CC: Haowen Bai , , Subject: [PATCH] media: m920x: Remove useless kfree Date: Fri, 22 Apr 2022 14:06:47 +0800 Message-ID: <1650607607-22893-1-git-send-email-baihaowen@meizu.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.16.137.70] X-ClientProxiedBy: IT-EXMB-1-126.meizu.com (172.16.1.126) To IT-EXMB-1-125.meizu.com (172.16.1.125) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After alloc fail, we do not need to kfree. Signed-off-by: Haowen Bai --- drivers/media/usb/dvb-usb/m920x.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/usb/dvb-usb/m920x.c b/drivers/media/usb/dvb-usb/m920x.c index 548199cd86f6..9df0ccfb654b 100644 --- a/drivers/media/usb/dvb-usb/m920x.c +++ b/drivers/media/usb/dvb-usb/m920x.c @@ -277,7 +277,6 @@ static int m920x_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int nu char *read = kmalloc(1, GFP_KERNEL); if (!read) { ret = -ENOMEM; - kfree(read); goto unlock; } -- 2.7.4