mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-14 21:10:27 +01:00
video: rk3399_mipi: correct error checking
Pointers are never negative. Use macro IS_ERR() for checking. cf. rk3288_mipi.c Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
This commit is contained in:
parent
e56a713eac
commit
fca10453cf
1 changed files with 1 additions and 1 deletions
|
|
@ -128,7 +128,7 @@ static int rk_mipi_ofdata_to_platdata(struct udevice *dev)
|
|||
struct rk_mipi_priv *priv = dev_get_priv(dev);
|
||||
|
||||
priv->grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF);
|
||||
if (priv->grf <= 0) {
|
||||
if (!priv->grf || IS_ERR(priv->grf)) {
|
||||
debug("%s: Get syscon grf failed (ret=%p)\n",
|
||||
__func__, priv->grf);
|
||||
return -ENXIO;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue