Skip to content

Commit

Permalink
driver: rknpu: Ignore devfreq init return value even if it failed
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Zeng <[email protected]>
Change-Id: I30e38acaf0af9e40a211bfcc2c71aecfffc533f5
  • Loading branch information
Felix Zeng authored and rkhuangtao committed Aug 29, 2022
1 parent 39c3a52 commit 5f65702
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion drivers/rknpu/include/rknpu_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#define DRIVER_NAME "rknpu"
#define DRIVER_DESC "RKNPU driver"
#define DRIVER_DATE "20220826"
#define DRIVER_DATE "20220829"
#define DRIVER_MAJOR 0
#define DRIVER_MINOR 8
#define DRIVER_PATCHLEVEL 2
Expand Down
9 changes: 3 additions & 6 deletions drivers/rknpu/rknpu_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,7 @@ static int rknpu_devfreq_init(struct rknpu_device *rknpu_dev)
opp = devfreq_recommended_opp(dev, &rknpu_dev->current_freq, 0);
if (IS_ERR(opp)) {
ret = PTR_ERR(opp);
return ret;
goto err_remove_table;
}
dev_pm_opp_put(opp);
dp->initial_freq = rknpu_dev->current_freq;
Expand Down Expand Up @@ -1313,7 +1313,6 @@ static int rknpu_devfreq_init(struct rknpu_device *rknpu_dev)
int ret = -EINVAL;

ret = rockchip_init_opp_table(dev, NULL, "npu_leakage", "rknpu");

if (ret) {
LOG_DEV_ERROR(dev, "failed to init_opp_table\n");
return ret;
Expand All @@ -1322,7 +1321,7 @@ static int rknpu_devfreq_init(struct rknpu_device *rknpu_dev)
ret = npu_devfreq_adjust_current_freq_volt(dev, rknpu_dev);
if (ret) {
LOG_DEV_ERROR(dev, "failed to adjust current freq volt\n");
return ret;
goto err_remove_table;
}
dp->initial_freq = rknpu_dev->current_freq;

Expand Down Expand Up @@ -1706,9 +1705,7 @@ static int rknpu_probe(struct platform_device *pdev)
goto err_remove_drv;

#ifndef FPGA_PLATFORM
ret = rknpu_devfreq_init(rknpu_dev);
if (ret)
goto err_remove_drv;
rknpu_devfreq_init(rknpu_dev);
#endif

// set default power put delay to 3s
Expand Down

0 comments on commit 5f65702

Please sign in to comment.