Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp480937lqd; Wed, 24 Apr 2024 08:05:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWQIgqLuwmT6+ZW9niPeTVVj+Fjh7oJIvClOFB0sjOnysUU1QEdLWx79ZJD4b912lt6zsx9Qw7Txrv9tnL5XcBSb9SH9qy9hwCKXmfl7A== X-Google-Smtp-Source: AGHT+IGp/MkuWbomYszccAZlUaa6L22Bp4w1F5p0sn1ZgHwdbgP7LHTA9oAinZQ8COnp4FOLtq5w X-Received: by 2002:ae9:f70e:0:b0:78d:67db:138b with SMTP id s14-20020ae9f70e000000b0078d67db138bmr2695879qkg.71.1713971136287; Wed, 24 Apr 2024 08:05:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713971136; cv=pass; d=google.com; s=arc-20160816; b=TqjcbRqF2cslnDP2f0RfrUR+CSk7FKXCVsHM7c7ZimF9jPyZKMq/EFAdONczPfRwVx nqYyw3uBfdRapFziLWBZ96/9j0hXpSLku1SAwCKzTjzevgdy1lECAbRZNWkEErz9kgaT bk3sWpEQyzoewLyLivn7G4QO794hDJejlzzolguHh8yOjjPt/zt3yA5fwIVSyewPp1J+ MU5f9k12CRJIJTsOAYddMFsuk9F9D3/csOeTwlfSind8H4u99EA96Gjm/n5sVeQxbRJL rrl/HoPqAqRgTX/8XVoiUV25WbtI7dRsGWIvGl0M5AdPRqbz4CxFLMwbmFKApBI+eUSU WDTA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=HRYQTL86S7iszempQr9kHRXwK3r/THL9d8asewXe2Ag=; fh=RjOlo/8SZ2VOi05cXjB5GLfmUaCMfPWSZNIjTtp65rM=; b=hjjT9+D3EFqs/PHXGaXct1ENJl9CqcmCZ0cPJwyB8QKHYa6ibDSUM7tNjGBoYQjcqx oDWmAEuPDRORV5HqeMP916REnsbesPwTcpXY8KO0N6bSXbyLhgZxYqtgwHFNjZpTuycT eZw5oiYxQdaoQgz5/46xswazGUfltQXOeDfZ8ONiWhOSgxjFKFaXq6EySdJKthYaudWW H0Ifl9I+oqQ6h78ZdCKtCcSSiM82TV6icokYuhQ96vwuSom0fCkHvXyvujV9O7FSXO6C 8JRkkIJ8IAR7xUdGShIsFJjx8OEeKx1QjWmrx/peTwNKCRqdnYYnJHAfFcJgOqg5EAEe BZaQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K464Wd1I; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-157155-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157155-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f20-20020a05620a15b400b0079089139e20si2716768qkk.472.2024.04.24.08.05.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 08:05:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157155-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K464Wd1I; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-157155-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157155-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id EF0621C24F9A for ; Wed, 24 Apr 2024 15:05:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 59EF115F400; Wed, 24 Apr 2024 15:05:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="K464Wd1I" Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4423515F3EB for ; Wed, 24 Apr 2024 15:05:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713971122; cv=none; b=G8l5nUt0xPBbjrbA6fzkOrWhwdrl8Ht2rlzhCFXYxpyL/y7UoiZyk2XfTOmUDB9eloDjVFabckfluE7NEzHq/0u6F0R93t7cUfhu2YSYuHFGCoa3YZYdrI2ikEkqxDvHDXpa+d0sC3U4ZoxZ93ABAX8dEDw5DN2N0nvbgD9Z7hM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713971122; c=relaxed/simple; bh=M2PXvP1fic5DS1K9axVojGNHcogjxY4cLWb7IesW5Co=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=sQo2jp6SOLKOx043GMUPNR3uaCLwLXALQlnv2WDaedkokXr8DMnIauPFTgIMK4O7UsVPbQlmuMHZCU3/TKRniRbqzNaysXnF9l9qXdBcOdvoXKpy/BgXLdQG13Mak1V3HYVOCFhnNHaycVFeOxGqIns9W18LMyOOd49mHzrN21s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=K464Wd1I; arc=none smtp.client-ip=209.85.208.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-572229f196bso2138512a12.0 for ; Wed, 24 Apr 2024 08:05:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713971118; x=1714575918; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=HRYQTL86S7iszempQr9kHRXwK3r/THL9d8asewXe2Ag=; b=K464Wd1IYxiRe9IESIbXo+hHRlasJmM8vrb0xTDYvV0JTBvI1Pks7/5EhpJgaqrhwo dqkYdIOfxNM75A5NL1brjTNkRrfwT7uZFNuwfGMztgbWBJ9qNzNVf0zXZwuT6kDmy+oD Hdg7HybbFiRMBosWKZUTz2KaZZenHSxgJ6XPmfd9sy7M/S/zCwQkC/CNGdRc1amXTSFl TtpI9qKbCSOGvCMB4leGZoKbjXnrij+vL5kUIXw3w8bsZs+TkysWBiLgALDafEUi1zOq ZSKOMfqlC9dPB6wUp3xztnsnr70Pd6ulbMIleQAvodJ5xW+B1tdiaa4drGOxQcdRjZJP QptQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713971118; x=1714575918; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HRYQTL86S7iszempQr9kHRXwK3r/THL9d8asewXe2Ag=; b=R7uQ219FoZHE0y0TmUTAzF47zjLKk0OL4aPBoRc1bJGZCiehuFNTY2JNsJhh0CUC9G 1goolWXttYWmWufitunnpXQv1Ep+Tc4em1x8sjV4379FQ07/g11+tUf86TvDN7/ZM2N/ s+P33e/pX9WWKgKaVAC84vRVDYo468lJDxfn9OgsDm5gZKWVUhS36vXtFCiqseVz+DNY MEdsj/nh+2hYCOSZ6pBrTXdFzHrmjZ3MvkoL6WznB2tWUCSK4q3fFDA0dCUxOlkD7WCy oXfa+VTR5hIyoBOAd0EG6x1RQa6QPMDkYO8lO485zqnaClwXHOufmVoRLieCrqrsBl8n wuTw== X-Forwarded-Encrypted: i=1; AJvYcCWRB2WYVxFLk4J4tt3ZfROiQ8FDPbCVLGXOCTuRL111wwLZrqv8ZVIfR8xcFhYSZzPxCzMDpzHzazwq5ZvtjX8o8sjNakOj49YP8ETn X-Gm-Message-State: AOJu0YzxLU5IiEBu9G9XynXY+IDBNcYxLXNkFk2mp81ZjCZBEI4w8BYE H7cxIPgvihYU0h9U/aZYHtbfAWxDJ4+x9nm/2kU9qzZGrGN//I5UpgWfRH+Cs1g= X-Received: by 2002:a50:d718:0:b0:571:c0e6:233c with SMTP id t24-20020a50d718000000b00571c0e6233cmr1636157edi.37.1713971118620; Wed, 24 Apr 2024 08:05:18 -0700 (PDT) Received: from [192.168.1.20] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id n13-20020a50cc4d000000b005721d18a843sm2264659edi.65.2024.04.24.08.05.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Apr 2024 08:05:17 -0700 (PDT) Message-ID: <74997967-7f7f-4fb2-8449-c7d795520858@linaro.org> Date: Wed, 24 Apr 2024 17:05:16 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] Bluetooth: qca: set power_ctrl_enabled on NULL returned by gpiod_get_optional() To: Bartosz Golaszewski Cc: Bartosz Golaszewski , Marcel Holtmann , Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, Wren Turkal , Zijun Hu References: <20240424122932.79120-1-brgl@bgdev.pl> <0f8ba1b5-490e-4961-80e2-7942f66730ec@linaro.org> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6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UwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 24/04/2024 16:52, Bartosz Golaszewski wrote: > On Wed, 24 Apr 2024 at 16:46, Krzysztof Kozlowski > wrote: >> >> On 24/04/2024 14:29, Bartosz Golaszewski wrote: >>> From: Bartosz Golaszewski >>> >> >>> qcadev->susclk = devm_clk_get_optional(&serdev->dev, NULL); >>> if (IS_ERR(qcadev->susclk)) { >>> @@ -2355,10 +2360,13 @@ static int qca_serdev_probe(struct serdev_device *serdev) >>> qcadev->bt_en = devm_gpiod_get_optional(&serdev->dev, "enable", >>> GPIOD_OUT_LOW); >>> if (IS_ERR(qcadev->bt_en)) { >>> - dev_warn(&serdev->dev, "failed to acquire enable gpio\n"); >>> - power_ctrl_enabled = false; >>> + dev_err(&serdev->dev, "failed to acquire enable gpio\n"); >>> + return PTR_ERR(qcadev->bt_en); >>> } >>> >>> + if (!qcadev->bt_en) >>> + power_ctrl_enabled = false; >> >> This looks duplicated - you already have such check earlier. >> > > It's under a different switch case! Damn diff. Yeah, looks ok. Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof