From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2B49C433B4 for ; Mon, 17 May 2021 09:01:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9D7CA61184 for ; Mon, 17 May 2021 09:01:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235814AbhEQJCm (ORCPT ); Mon, 17 May 2021 05:02:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235711AbhEQJCl (ORCPT ); Mon, 17 May 2021 05:02:41 -0400 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 876AFC061573 for ; Mon, 17 May 2021 02:01:24 -0700 (PDT) Received: by mail-pg1-x52e.google.com with SMTP id i5so4233165pgm.0 for ; Mon, 17 May 2021 02:01:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9OkKHJwSRtsD1XoVSI9D7062oV0S6RC6cgh0CBzJGxQ=; b=wurd6Th2hC0CtygbnWfpzXlmQIro6bMhdR7DCsDpr4cXF8QvJWfU2H7SuFcfuyl/on xtOSzL9mRf6Qpm+/yH9LQawbpjRtEIfDuKPownnp0Bixi4DHYm0Cv4Ovg/7BeVIjwGte Vgvdu50DNIgJdrMFWpziD3ZSowR3zWxzQazg7uoQJt6bE8+uPeOEhd7o2h/HBsYbh8lU hlikFoTOsIDijq4sx06mXFj7NwWE6z4lsmpAtBJraB2mLA7f3Dcuke8KR7G53Vp1OhUK kMKP77uZj4QYkMbZjh+ysYt/FSCyNPtmGQ0qYnuNvshMWQykCTz+CBHahzQff7YY7bCB 17QA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9OkKHJwSRtsD1XoVSI9D7062oV0S6RC6cgh0CBzJGxQ=; b=VqBqKcaIBVKwFkLui9oUX9rzExuRO3oBFgSfA8zFF4hCz3go/Z42AC8rvE22OuKktt Soty8rEJ1uXu+fIORjOqspIvA1wcmDTVqMgn86veC9wiC8PwHTWYzdUtMTUtubEiSiSx 5gI4tSBnpUq7eHsb0wi+Z64lbHWjx2L6iCzr2DvpOFWgkj194V4Xe3SzbwuoWJcyiGAp FUAchOY3TNCZ/3opaKBsnx4hMAjJxwhtyQHD/bC/Frr6iYhJVYG7rwenqIGvkeZ0HeEV cA/1Wp1cfZx2f8HkRXmoKx6gyKfzPIKZwcrr8yCu4JcOLCauLiAdaIqO/vznUBnRhMJK kC6A== X-Gm-Message-State: AOAM530T8CD8oavE2VZox+BNVc2zAA61mONubuiSH0niN8xF6DM9oypn vL2Pp+9mQLxbLl2H53SUamHhAPO/xI/np3KFVTwxrQ== X-Google-Smtp-Source: ABdhPJyp+18LHyzRAiO7+sc3FHiRgXNmFI/UTNc7tUNrDDRlUREycMbppyLtZcKvXSr6KiyqKSsBhvaEt7CAlg7Cf0M= X-Received: by 2002:a63:4e01:: with SMTP id c1mr46758645pgb.265.1621242084104; Mon, 17 May 2021 02:01:24 -0700 (PDT) MIME-Version: 1.0 References: <20210514070306.606-1-linqiheng@huawei.com> In-Reply-To: <20210514070306.606-1-linqiheng@huawei.com> From: Robert Foss Date: Mon, 17 May 2021 11:01:13 +0200 Message-ID: Subject: Re: [PATCH -next] drm: bridge: fix wrong pointer passed to PTR_ERR() To: Qiheng Lin Cc: Phong LE , Neil Armstrong , Andrzej Hajda , David Airlie , Daniel Vetter , dri-devel , linux-kernel , kernel-janitors@vger.kernel.org, Hulk Robot Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey Qiheng, Thanks for submitting this bugfix. The title of this patch should probably be: drm: bridge: it66121: fix wrong pointer passed to PTR_ERR() With this fixed, feel free to add my r-b. Reviewed-by: Robert Foss On Fri, 14 May 2021 at 09:03, Qiheng Lin wrote: > > PTR_ERR should access the value just tested by IS_ERR, otherwise > the wrong error code will be returned. > > Reported-by: Hulk Robot > Signed-off-by: Qiheng Lin > --- > drivers/gpu/drm/bridge/ite-it66121.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/bridge/ite-it66121.c b/drivers/gpu/drm/bridge/ite-it66121.c > index d8a60691fd32..6980c9801d0d 100644 > --- a/drivers/gpu/drm/bridge/ite-it66121.c > +++ b/drivers/gpu/drm/bridge/ite-it66121.c > @@ -943,7 +943,7 @@ static int it66121_probe(struct i2c_client *client, > ctx->regmap = devm_regmap_init_i2c(client, &it66121_regmap_config); > if (IS_ERR(ctx->regmap)) { > ite66121_power_off(ctx); > - return PTR_ERR(ctx); > + return PTR_ERR(ctx->regmap); > } > > regmap_read(ctx->regmap, IT66121_VENDOR_ID0_REG, &vendor_ids[0]); > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0DC5AC433B4 for ; Mon, 17 May 2021 09:01:26 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C0CD261184 for ; Mon, 17 May 2021 09:01:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C0CD261184 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1A3AE6E906; Mon, 17 May 2021 09:01:25 +0000 (UTC) Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by gabe.freedesktop.org (Postfix) with ESMTPS id 809CF6E8FD for ; Mon, 17 May 2021 09:01:24 +0000 (UTC) Received: by mail-pf1-x435.google.com with SMTP id 10so4504584pfl.1 for ; Mon, 17 May 2021 02:01:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9OkKHJwSRtsD1XoVSI9D7062oV0S6RC6cgh0CBzJGxQ=; b=wurd6Th2hC0CtygbnWfpzXlmQIro6bMhdR7DCsDpr4cXF8QvJWfU2H7SuFcfuyl/on xtOSzL9mRf6Qpm+/yH9LQawbpjRtEIfDuKPownnp0Bixi4DHYm0Cv4Ovg/7BeVIjwGte Vgvdu50DNIgJdrMFWpziD3ZSowR3zWxzQazg7uoQJt6bE8+uPeOEhd7o2h/HBsYbh8lU hlikFoTOsIDijq4sx06mXFj7NwWE6z4lsmpAtBJraB2mLA7f3Dcuke8KR7G53Vp1OhUK kMKP77uZj4QYkMbZjh+ysYt/FSCyNPtmGQ0qYnuNvshMWQykCTz+CBHahzQff7YY7bCB 17QA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9OkKHJwSRtsD1XoVSI9D7062oV0S6RC6cgh0CBzJGxQ=; b=N432oDW5hcdz+yZ0bxPKjWxiGBUT4znTC06bzS3Td+WfFWqZ+qATd0ZEwNu7IMFp1n frQOvzQaTWEE0VnbeFf0eMGzODV82/FrPCiMao+hHxQb1P25Ya7Uljg6QJX8eOSdX/RD 1cqevbJMP3N8DCzgE2NMsmGsEPQ0CO2ABX6O4+GZTYQgAlvlndLAZZBJe80DRRdEkAxp HaSZGlcUTvIBYpDJkeyCBnrHbxyd3uT78ZvU6uTDfqI3eSzKebfsNcw1G6i3bvPjoTJa SJcIsH4ZMR1SwWx3REvG8Pi4md97gQ7NlBVQzoqcRL7zUUIEBC4d+y2E6Qb4MiIFbLuC qAdQ== X-Gm-Message-State: AOAM531d3zI+7NOav+Prwy1AtuevGlGO27jpzy9zoQFMf2dB5xRSADmA TPd2KNDONhAfqEtKBkTExowcBoSSvDKc+3Idpafl6w== X-Google-Smtp-Source: ABdhPJyp+18LHyzRAiO7+sc3FHiRgXNmFI/UTNc7tUNrDDRlUREycMbppyLtZcKvXSr6KiyqKSsBhvaEt7CAlg7Cf0M= X-Received: by 2002:a63:4e01:: with SMTP id c1mr46758645pgb.265.1621242084104; Mon, 17 May 2021 02:01:24 -0700 (PDT) MIME-Version: 1.0 References: <20210514070306.606-1-linqiheng@huawei.com> In-Reply-To: <20210514070306.606-1-linqiheng@huawei.com> From: Robert Foss Date: Mon, 17 May 2021 11:01:13 +0200 Message-ID: Subject: Re: [PATCH -next] drm: bridge: fix wrong pointer passed to PTR_ERR() To: Qiheng Lin Content-Type: text/plain; charset="UTF-8" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , David Airlie , Hulk Robot , kernel-janitors@vger.kernel.org, linux-kernel , dri-devel , Phong LE , Andrzej Hajda Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hey Qiheng, Thanks for submitting this bugfix. The title of this patch should probably be: drm: bridge: it66121: fix wrong pointer passed to PTR_ERR() With this fixed, feel free to add my r-b. Reviewed-by: Robert Foss On Fri, 14 May 2021 at 09:03, Qiheng Lin wrote: > > PTR_ERR should access the value just tested by IS_ERR, otherwise > the wrong error code will be returned. > > Reported-by: Hulk Robot > Signed-off-by: Qiheng Lin > --- > drivers/gpu/drm/bridge/ite-it66121.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/bridge/ite-it66121.c b/drivers/gpu/drm/bridge/ite-it66121.c > index d8a60691fd32..6980c9801d0d 100644 > --- a/drivers/gpu/drm/bridge/ite-it66121.c > +++ b/drivers/gpu/drm/bridge/ite-it66121.c > @@ -943,7 +943,7 @@ static int it66121_probe(struct i2c_client *client, > ctx->regmap = devm_regmap_init_i2c(client, &it66121_regmap_config); > if (IS_ERR(ctx->regmap)) { > ite66121_power_off(ctx); > - return PTR_ERR(ctx); > + return PTR_ERR(ctx->regmap); > } > > regmap_read(ctx->regmap, IT66121_VENDOR_ID0_REG, &vendor_ids[0]); >