Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5452139pxu; Tue, 22 Dec 2020 18:25:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJxmPcshUYty8f4q5dJzz22IqEDcpB1zX+zKyS+pP+AYBE3rZ33VTnx4lYtKXU878ykxDcXQ X-Received: by 2002:a17:906:3953:: with SMTP id g19mr21970719eje.429.1608690348396; Tue, 22 Dec 2020 18:25:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608690348; cv=none; d=google.com; s=arc-20160816; b=k50qytyHKGmaHYB8teHmZZsWCqu0ZxpHkNeN8owIkBdOSMY5jG5wmAPM3X+tKpwahx Kw4a7xlu6NoHgxqfZNeW39YGj7rdhrK7bZr8/NuqcxubMGK71Z74ws/a260yMPPrsGM1 ZlZADLnrWQehdKRzHxg79i2sYruifGKi2EcPKROJY6eF+9wjNIE1wA+F8g8nPNSTHm1E PiNRRC3IcfHxfbpsOnBNYeqJLrWRZOBRgiiVkQ3ZF86/bvMWvM2imMW+fn+BISrJWozd hVMVP2ZdglApa9Nb76BB+wDPEBfgBYLwyWfa3MMgKpv20b/AJYVFP0WRLNN8gxJLNkMB xNGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=elmqTgZQgvRdThQ1Dm6+hY50RXDccAQMpz/DNeGN6pI=; b=Uig9pmHVHX+CUWKNWTKO/xUzDhlbALUFn8ILpCVk8INrI9ZkWVKWVZ9aKBFC8dKIL1 PnIVeh3Cz3EdrHhcoTVSe2evuxCr15Ql+FLH+JKjLgPY8Aad9Iauu0wAaFgagbTUsPOA YrD+HXsNn7CCB0mu6JGMGLQKnT0nmBZ2FmREHLFjEzd/FXItOLupMRpXrBFBvMUbMrQR 8l0WwNNojXwd2uRMW/BpIUxU+DE+lZVM+EAOAdY3EwpswXL+E7FyF9BNZ9r9Hs9xQgJl 0kdZ3V9f9TuBRkEZ5KDieTjA38Tbv5Aru58azvX7lH1BDl0Nb5rp+oxYfL6iJ/oAFT8H /9GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bCWxfudh; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j19si4427569eja.233.2020.12.22.18.25.26; Tue, 22 Dec 2020 18:25:48 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bCWxfudh; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728375AbgLWCYE (ORCPT + 99 others); Tue, 22 Dec 2020 21:24:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:52508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730049AbgLWCXj (ORCPT ); Tue, 22 Dec 2020 21:23:39 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id AAC77229C5; Wed, 23 Dec 2020 02:23:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1608690204; bh=HBFKJRUNnuRB3+JHTHYEaqddBshl2Ypix3QmFmjnWHQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bCWxfudhbO/YuiUl71Kc02Aq14JhKiEW5qSAe4gNsU1InhcQs/Usu4o9kk2x8WDUr jJN4MvzhepqKKZ7hkLmZ3LKv+L0BArWy9YN6OzXNZ0hRilqizBbFrHBt51F79NIO9h qFwLXbwBmV0WtwJpNA54LKWb+icFu4hS5/Re662gO5hHg3Szzgj8G51mv5O4i1i0Kb Jsb/7J0/yA4Xzz5Q5dx2beuG+83D2ICFnADX/RSwtJ7jRlkKcNP0f0HSPe40HIhY6G hm2CLtEJJb6xCpxFjCqqeBzT2NVYPgPfaL+ehdo4VlMJ+ULu+bwGShrRZuwuIjMwlq u2jIKE+bZZTlA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Qinglang Miao , Sean Young , Mauro Carvalho Chehab , Sasha Levin , linux-media@vger.kernel.org Subject: [PATCH AUTOSEL 4.14 25/66] media: usb: dvb-usb-v2: zd1301: fix missing platform_device_unregister() Date: Tue, 22 Dec 2020 21:22:11 -0500 Message-Id: <20201223022253.2793452-25-sashal@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201223022253.2793452-1-sashal@kernel.org> References: <20201223022253.2793452-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Qinglang Miao [ Upstream commit ee50d6e60d9a8e110e984cdd9e788d93eff540ba ] Add the missing platform_device_unregister() before return from zd1301_frontend_attach in the error handling case when pdev->dev.driver is empty. There's an error handling route named err_platform_device_unregister, so just reuse it. Signed-off-by: Qinglang Miao Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/usb/dvb-usb-v2/zd1301.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/dvb-usb-v2/zd1301.c b/drivers/media/usb/dvb-usb-v2/zd1301.c index d1eb4b7bc0519..563d11fb6c18c 100644 --- a/drivers/media/usb/dvb-usb-v2/zd1301.c +++ b/drivers/media/usb/dvb-usb-v2/zd1301.c @@ -159,7 +159,7 @@ static int zd1301_frontend_attach(struct dvb_usb_adapter *adap) } if (!pdev->dev.driver) { ret = -ENODEV; - goto err; + goto err_platform_device_unregister; } if (!try_module_get(pdev->dev.driver->owner)) { ret = -ENODEV; -- 2.27.0