rk: Replace deprecated PTR_RET

According to commit fad7c90209 ("err.h: remove deprecated PTR_RET for good").

Initially, commit fa9ee9c4b9 ("include/linux/err.h: add a function to
cast error-pointers to a return value") from Uwe Kleine-König introduced
PTR_RET in 03/2011. Then, in 07/2013, commit 6e8b8726ad ("PTR_RET is
now PTR_ERR_OR_ZERO") from Rusty Russell renamed PTR_RET to
PTR_ERR_OR_ZERO, and left PTR_RET as deprecated-marked alias.

After six years since the renaming and various repeated cleanups in the
meantime, it is time to finally remove the deprecated PTR_RET for good.

Change-Id: I2b5d464dc1c6bc0409e41dd9da503f14bef17dc7
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This commit is contained in:
Tao Huang
2021-04-12 14:55:17 +08:00
parent fd2bfab3ee
commit d4de7bcdff
3 changed files with 3 additions and 3 deletions

View File

@@ -258,7 +258,7 @@ int mali_dma_buf_get_size(struct mali_session_data *session, _mali_uk_dma_buf_ge
buf = dma_buf_get(fd);
if (IS_ERR_OR_NULL(buf)) {
MALI_DEBUG_PRINT_ERROR(("Failed to get dma-buf from fd: %d\n", fd));
return PTR_RET(buf);
return PTR_ERR_OR_ZERO(buf);
}
if (0 != put_user(buf->size, &user_arg->size)) {

View File

@@ -903,7 +903,7 @@ static int es7210_probe(struct snd_soc_component *component)
//ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_I2C);//8,8
#else
component->control_data = devm_regmap_init_i2c(es7210->i2c_client, &es7210_regmap_config);
ret = PTR_RET(component->control_data);
ret = PTR_ERR_OR_ZERO(component->control_data);
#endif
if (ret < 0) {

View File

@@ -1948,7 +1948,7 @@ static int es7243e_probe(struct snd_soc_component *component)
#else
component->control_data = devm_regmap_init_i2c(es7243e->i2c,
&es7243e_regmap_config);
ret = PTR_RET(component->control_data);
ret = PTR_ERR_OR_ZERO(component->control_data);
#endif
if (ret < 0) {
dev_err(component->dev, "Failed to set cache I/O: %d\n", ret);