From patchwork Tue Mar 30 13:04:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Yingliang X-Patchwork-Id: 72731 X-Patchwork-Delegate: sakari.ailus@iki.fi Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1lRE11-004ZZd-HR; Tue, 30 Mar 2021 13:02:40 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231960AbhC3NCC (ORCPT + 1 other); Tue, 30 Mar 2021 09:02:02 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:15108 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232095AbhC3NBj (ORCPT ); Tue, 30 Mar 2021 09:01:39 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4F8qKL0SFHz1BFPK; Tue, 30 Mar 2021 20:59:34 +0800 (CST) Received: from huawei.com (10.175.103.91) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.498.0; Tue, 30 Mar 2021 21:01:33 +0800 From: Yang Yingliang To: , CC: Subject: [PATCH -next] media: i2c: ov5648: fix wrong pointer passed to IS_ERR() and PTR_ERR() Date: Tue, 30 Mar 2021 21:04:46 +0800 Message-ID: <20210330130446.1053644-1-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.103.91] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -2.4 (--) X-LSpam-Report: No, score=-2.4 required=5.0 tests=BAYES_00=-1.9,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1 autolearn=ham autolearn_force=no IS_ERR() and PTR_ERR() use wrong pointer, it should be sensor->dovdd, fix it. Fixes: e43ccb0a045f ("media: i2c: Add support for the OV5648 image sensor") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/media/i2c/ov5648.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/ov5648.c b/drivers/media/i2c/ov5648.c index dfe38ab8224d..db6f626f92fb 100644 --- a/drivers/media/i2c/ov5648.c +++ b/drivers/media/i2c/ov5648.c @@ -2494,9 +2494,9 @@ static int ov5648_probe(struct i2c_client *client) /* DOVDD: digital I/O */ sensor->dovdd = devm_regulator_get(dev, "dovdd"); - if (IS_ERR(sensor->dvdd)) { + if (IS_ERR(sensor->dovdd)) { dev_err(dev, "cannot get DOVDD (digital I/O) regulator\n"); - ret = PTR_ERR(sensor->dvdd); + ret = PTR_ERR(sensor->dovdd); goto error_endpoint; }