Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp164491ybz; Tue, 21 Apr 2020 17:46:39 -0700 (PDT) X-Google-Smtp-Source: APiQypIuFItu60vyObB/XR2lvUDL5aNWp3QM3oTwbl64riglWjXDxM/80IB3nro8GcdYhxIG/QcH X-Received: by 2002:a17:906:16d0:: with SMTP id t16mr23173102ejd.303.1587516399764; Tue, 21 Apr 2020 17:46:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587516399; cv=none; d=google.com; s=arc-20160816; b=ZTLtJtLH2VAJyMuEykzGET+HHIBdlmF3Zk+rhsNlzkb+p1MpMlzGmFGStG4CN9glag Xc92LQCf6+SSev6kMS17N8XhIlXgTHzlnNi+3UxlRh8SlTV5e6woXShgwZi5CSBEzYtJ 6DwDtoW7AHuFIOiO2I7TIsFkurvRmN4er8HgQkfkxlPK9VeOd83afe9GiruAHgKzHG6y M9TETDL4nAaVJE4Yg8Qk5gMgAUE66EqJou8XaEcF53OaJnT6DbTmPCCVpoQbBwGtacNY IR1VCDBqrxHy9hu/nY01toT/CB4i3HMo4rEZE9XFsAjsZTdOU88D5530Q5xArFvayUVB eF3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=un8H474QNqq9mh1Fli1mXz/+xpNjOExFpRjKSjnMqjw=; b=wNClTMEJ9oK4sup7swwQdqLXZBzDt2jA60nmMLqOpAh4ParemzUb/giM+tYUpLKd+9 T8S7bVREEIkphYkkSzHXeuWK3OBnq0s6x82sVMaKEXIbxhUwNplEm9keQa8CHUDqsEXK 73LyP9Lyowza/RqWFbjMav3/RUfUG9JgVwD46lFuEaqiiYQdcCRPdCWLIojdyn7KOuCo wI6zi5Xg2xWD+uaIgE5zyOcz+xhM7oVyONa/j0lUIzAHIM5zzM9NNz12iDvs5O5b1+Yr djv22/4u6l3uETnGpFF+cwT/ee1m5YK5MSGXRfVU2Mhady0ZBpv44G0+IYIqqtsFWW02 At5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kzf8kWkh; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r24si2759328edc.217.2020.04.21.17.46.16; Tue, 21 Apr 2020 17:46:39 -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; dkim=pass header.i=@chromium.org header.s=google header.b=kzf8kWkh; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726442AbgDVAm2 (ORCPT + 99 others); Tue, 21 Apr 2020 20:42:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726012AbgDVAm1 (ORCPT ); Tue, 21 Apr 2020 20:42:27 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4D86C0610D5 for ; Tue, 21 Apr 2020 17:42:27 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id f20so204263pgl.12 for ; Tue, 21 Apr 2020 17:42:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=un8H474QNqq9mh1Fli1mXz/+xpNjOExFpRjKSjnMqjw=; b=kzf8kWkhX2BHoz/5S3IIj8vMuAjNeiv0HPear2pSraFd7aEaAxRP4HTuc88OeTp4qd SXFuzDHFn2GoqNN9fFtnDCxLF62wJ1KvUDOrH1NFB6+Zkt7C8sWqz4ygWoZLy/glM6gX rcwJzK49O+nah7/d97CzDLdT7elz52vRRrwWU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=un8H474QNqq9mh1Fli1mXz/+xpNjOExFpRjKSjnMqjw=; b=aRkA4F3MkLtXqnf/V+EQPSsdmoIMkGERH+RK2yuwLm0wTz+oFfZaujPcwuJe9gz6je gbKQh/eWM09hnZLjT42bEm9uKbdbeNDAjh5ZOowq6BM/yh1KKLHMx0Kf8crbdM3ZlN4t e0MxCiGNFP7zb06/w9YcmmaVDnaJCH66F0CvRjOwGYqeObtmRDUKxiDj/Gbk15jg5kzv +i2cGEHobfcRFqFPSRxwiRNzKUp0OYpeJ7Q0a/mQb7appWJdx56Lwbsfl1/jXQ8DsiL7 Vbtj52DjKhejhfplOOOVUo7BzltybGraUchA7k0Afao1pyV0TiHeI+qDxCUHcGn+fBdR pFkw== X-Gm-Message-State: AGi0Pua1xzInqAu1tSxGm1gGWfQv1OtE/UQnThMSzKnpOJZ4ZDQqOUj9 EfS3cbB8i3V8W/Syj4r6Be8MoVfEcRE= X-Received: by 2002:a63:554c:: with SMTP id f12mr19298211pgm.163.1587516147052; Tue, 21 Apr 2020 17:42:27 -0700 (PDT) Received: from pmalani2.mtv.corp.google.com ([2620:15c:202:201:476b:691:abc3:38db]) by smtp.gmail.com with ESMTPSA id o185sm3576066pfg.197.2020.04.21.17.42.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Apr 2020 17:42:26 -0700 (PDT) From: Prashant Malani To: linux-kernel@vger.kernel.org Cc: Prashant Malani , Benson Leung , Enric Balletbo i Serra , Guenter Roeck , Heikki Krogerus Subject: [PATCH] platform/chrome: typec: Fix ret value check error Date: Tue, 21 Apr 2020 17:41:51 -0700 Message-Id: <20200422004151.116323-1-pmalani@chromium.org> X-Mailer: git-send-email 2.26.1.301.g55bc3eb7cb9-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org cros_typec_add_partner() returns 0 on success, so check for "ret" instead of "!ret" as an error. Signed-off-by: Prashant Malani Fixes: 9d33ea331032 ("platform/chrome: cros_ec_typec: Register port partner") --- drivers/platform/chrome/cros_ec_typec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c index eda57db26f8d..66b8d21092af 100644 --- a/drivers/platform/chrome/cros_ec_typec.c +++ b/drivers/platform/chrome/cros_ec_typec.c @@ -263,7 +263,7 @@ static void cros_typec_set_port_params_v1(struct cros_typec_data *typec, pd_en = resp->enabled & PD_CTRL_RESP_ENABLED_PD_CAPABLE; ret = cros_typec_add_partner(typec, port_num, pd_en); - if (!ret) + if (ret) dev_warn(typec->dev, "Failed to register partner on port: %d\n", port_num); -- 2.26.1.301.g55bc3eb7cb9-goog