Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1459200ybh; Sun, 19 Jul 2020 21:15:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwP0mnI68TM9abFaANGZ+9VlBI0GdTRD89yNDyOKMF5eR1ukkyrltF8f0ncEecGNleVquhG X-Received: by 2002:a05:6402:1bdd:: with SMTP id ch29mr19808337edb.134.1595218521462; Sun, 19 Jul 2020 21:15:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595218521; cv=none; d=google.com; s=arc-20160816; b=MthT6CA/GYUqiJRqQLRmtIg85b2/XHWYp110tmN6t15BMDwZIP29VAbZEhqT5UMFdh LgBIOGhudKBF3sHm/cojsrK30+ZDuBPCdBJF0w2FkP2N+C7jvaf/Njcj3hLMKZ7443tQ FSXJmoQu7maCkpulE4R4Ii0Pjbe3+q4aL3KDaT/AF+OBvtDYjbE4ddB0oSso8h+B2C93 Frk3A93NvpkREXmGI8YARrhWrsf/wOb0JgxJTP23euk/+eJl4TCdCqf1bWx4ODBQ2Ruu MhDSlSVzGXIMU6Itc9Yr5cr91njNfBkCDVEEhKPNMAEZnedBzL3q0RgvHL8yvUEjrJPh O2QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=heE3mczcqPq9PjSiqG2IQJbdPiLSnINE0NKPzIRRymI=; b=GvZbvtYV2qddAssebdYCLPTdOYPipu842OyQKr0KzKVknINl1GRTjGp/lvyNwMEO5c Tax+ZpfSnmebMfLxWX6zRqotW2EX1P0RLEkKpxAyui2C8frzc8QHil7XFMbQBkJk4PJC gVUPFSYA5dQegfQxtXR/5BnZH6yKp/dlqpFFFDzVz60rex4pfD9v78BOpoADFOQHoILY gvj/2Scx1nUNXOcrBMafCaao0L7+W8Vfz1CCuClUhw0I1WPjcPA6usyowUe2vQ6hj+h6 XkzdkwzHAY8SsDRNqghDMC8qABx/dwcnllPcVIMEWWtnaJJZr162vco/1jSODz7MUp3Q 9jzg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v8si10140750edr.557.2020.07.19.21.14.58; Sun, 19 Jul 2020 21:15:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726092AbgGTEN5 (ORCPT + 99 others); Mon, 20 Jul 2020 00:13:57 -0400 Received: from smtp21.cstnet.cn ([159.226.251.21]:47528 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725263AbgGTEN4 (ORCPT ); Mon, 20 Jul 2020 00:13:56 -0400 Received: from localhost (unknown [159.226.5.99]) by APP-01 (Coremail) with SMTP id qwCowACXi9j2GRVfckTkAQ--.24694S2; Mon, 20 Jul 2020 12:13:43 +0800 (CST) From: Xu Wang To: mchehab@kernel.org, sean@mess.org, vulab@iscas.ac.cn, oneukum@suse.com, yangyingliang@huawei.com, johan@kernel.org, colin.king@canonical.com, linux-media@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH] media: b2bc: remove needless check before usb_free_coherent() Date: Mon, 20 Jul 2020 04:13:41 +0000 Message-Id: <20200720041341.7506-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: qwCowACXi9j2GRVfckTkAQ--.24694S2 X-Coremail-Antispam: 1UD129KBjvdXoWrKFWrZw4UGr47GFWfKryfZwb_yoWftrg_XF Z3urnrX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vutnvoduhdfq/1tbiCAEDA18J9gI5SQABsa Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org usb_free_coherent() is safe with NULL addr and this check is not required. Signed-off-by: Xu Wang --- drivers/media/usb/b2c2/flexcop-usb.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/media/usb/b2c2/flexcop-usb.c b/drivers/media/usb/b2c2/flexcop-usb.c index 198ddfb8d2b1..c2cf1927c814 100644 --- a/drivers/media/usb/b2c2/flexcop-usb.c +++ b/drivers/media/usb/b2c2/flexcop-usb.c @@ -419,10 +419,7 @@ static void flexcop_usb_transfer_exit(struct flexcop_usb *fc_usb) usb_free_urb(fc_usb->iso_urb[i]); } - if (fc_usb->iso_buffer != NULL) - usb_free_coherent(fc_usb->udev, - fc_usb->buffer_size, fc_usb->iso_buffer, - fc_usb->dma_addr); + usb_free_coherent(fc_usb->udev, fc_usb->buffer_size, fc_usb->iso_buffer, fc_usb->dma_addr); } static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb) -- 2.17.1