From patchwork Sat May 15 06:58:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 439431 Delivered-To: patch@linaro.org Received: by 2002:a02:b78d:0:0:0:0:0 with SMTP id f13csp952084jam; Fri, 14 May 2021 23:59:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfJ0r9KSkFIm5b7Ga5dSvdg+TjqT+AlXppBlyIfDjq8dBUcsQmAVYciwCnb0F2v1AykdGn X-Received: by 2002:a17:906:4789:: with SMTP id cw9mr18525012ejc.325.1621061940028; Fri, 14 May 2021 23:59:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621061940; cv=none; d=google.com; s=arc-20160816; b=TF3n1j3oMdGesjwr/5lvSzlT8z92EC2oTxOBuvc1gqdnSUkEb37Aabj8xCSzkg9n0f d8623j8fNXgWI5Pb46lj6ImFdd9/j7YQJsM/vXg+dec50r/4BnuQ6UPRHoFWsTwFH6gE xi5JKpZPDhxANgEr46nQk7t4G7BbCr2iHihDe1ZcyIHQfzRwuyVj/hsJtNWDsjKx6nDH 4UOZU33SjpPQGopGct0OSY/HP5fFXR9ZZxjo1ZJrjVUClStzJTArmD91p30k0D65ZmfD ZlHGtWq1nZgUis8Up868AMYG/KA8V39F+ciCIbqDj4rwdF6qtHTun6liTYYlrGP2fNtS SlAQ== 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 :message-id:date:subject:cc:to:from; bh=ox4fzrpSOQ1b3jEySvul4biemi1jO3bfFV9VKoISls4=; b=lTRRegQ9kQvvc0V+ZAVbz3c1WR45vOrX2o/4dXN46n7XSmNGfbYPR0uJdJLG9sKKao 2qL2Ou8hwIpLbJVAe0Rwt0w9NO10jePfseMuuHnzaxNtkQLteZIaaG5Q5iOqmMS4VzO4 rM+NCUQOgWDNvicJeJJMI9cajrjkqFxqY38zuvXQ/dbspksh5g6sgoGoUs5San2j/K4V KVQc5azCHnOXM7D5XoNN1e+n0S/xjMwy1jvGAKScAf3CSgVaEmwRozbZIDLrZSqBeh/Z KZ/UwMb8S05iIXOfTeSPD5EtWfLmEPs6QP+yjOog5y6APTkdukLaEVB8fPQ2Qqyc/yJY HgIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-media-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id au20si8131790ejc.602.2021.05.14.23.58.59; Fri, 14 May 2021 23:59:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-media-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-media-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232435AbhEOHAF (ORCPT + 4 others); Sat, 15 May 2021 03:00:05 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:3690 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229943AbhEOHAF (ORCPT ); Sat, 15 May 2021 03:00:05 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4Fhx4k4Yblz16QDT; Sat, 15 May 2021 14:56:06 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.72) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.498.0; Sat, 15 May 2021 14:58:38 +0800 From: Zhen Lei To: Mats Randgaard , Mauro Carvalho Chehab , Hans Verkuil , Philipp Zabel , linux-media CC: Zhen Lei Subject: [PATCH 1/1] media: tc358743: Fix error return code in tc358743_probe_of() Date: Sat, 15 May 2021 14:58:30 +0800 Message-ID: <20210515065830.7045-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.177.72] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org When the CSI bps per lane is not in the valid range, an appropriate error code -EINVAL should be returned. However, we currently do not explicitly assign this error code to 'ret'. As a result, 0 was incorrectly returned. Fixes: 256148246852 ("[media] tc358743: support probe from device tree") Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/media/i2c/tc358743.c | 1 + 1 file changed, 1 insertion(+) -- 2.26.0.106.g9fadedd diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c index 1b309bb743c7bd7..f21da11caf22411 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c @@ -1974,6 +1974,7 @@ static int tc358743_probe_of(struct tc358743_state *state) bps_pr_lane = 2 * endpoint.link_frequencies[0]; if (bps_pr_lane < 62500000U || bps_pr_lane > 1000000000U) { dev_err(dev, "unsupported bps per lane: %u bps\n", bps_pr_lane); + ret = -EINVAL; goto disable_clk; }