CC: [email protected]
CC: [email protected]
TO: Serge Semin <[email protected]>
CC: Stephen Boyd <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   6a70f89cc58f2368efa055cbcbd8b37384f6c588
commit: 353afa3a8d2ef4a4b25db823ffd05d440b3530cb clk: Add Baikal-T1 CCU 
Dividers driver
date:   7 weeks ago
:::::: branch date: 12 hours ago
:::::: commit date: 7 weeks ago
config: i386-randconfig-m021-20200718 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

smatch warnings:
drivers/clk/baikal-t1/clk-ccu-div.c:282 ccu_div_reset() warn: passing a valid 
pointer to 'PTR_ERR'

# 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=353afa3a8d2ef4a4b25db823ffd05d440b3530cb
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 353afa3a8d2ef4a4b25db823ffd05d440b3530cb
vim +/PTR_ERR +282 drivers/clk/baikal-t1/clk-ccu-div.c

353afa3a8d2ef4a Serge Semin 2020-05-27  261  
353afa3a8d2ef4a Serge Semin 2020-05-27  262  static int ccu_div_reset(struct 
reset_controller_dev *rcdev,
353afa3a8d2ef4a Serge Semin 2020-05-27  263                      unsigned long 
rst_id)
353afa3a8d2ef4a Serge Semin 2020-05-27  264  {
353afa3a8d2ef4a Serge Semin 2020-05-27  265     struct ccu_div_data *data = 
to_ccu_div_data(rcdev);
353afa3a8d2ef4a Serge Semin 2020-05-27  266     const struct ccu_div_rst_map 
*map;
353afa3a8d2ef4a Serge Semin 2020-05-27  267     struct ccu_div *div;
353afa3a8d2ef4a Serge Semin 2020-05-27  268     int idx, ret;
353afa3a8d2ef4a Serge Semin 2020-05-27  269  
353afa3a8d2ef4a Serge Semin 2020-05-27  270     for (idx = 0, map = 
data->rst_map; idx < data->rst_num; ++idx, ++map) {
353afa3a8d2ef4a Serge Semin 2020-05-27  271             if (map->rst_id == 
rst_id)
353afa3a8d2ef4a Serge Semin 2020-05-27  272                     break;
353afa3a8d2ef4a Serge Semin 2020-05-27  273     }
353afa3a8d2ef4a Serge Semin 2020-05-27  274     if (idx == data->rst_num) {
353afa3a8d2ef4a Serge Semin 2020-05-27  275             pr_err("Invalid reset 
ID %lu specified\n", rst_id);
353afa3a8d2ef4a Serge Semin 2020-05-27  276             return -EINVAL;
353afa3a8d2ef4a Serge Semin 2020-05-27  277     }
353afa3a8d2ef4a Serge Semin 2020-05-27  278  
353afa3a8d2ef4a Serge Semin 2020-05-27  279     div = ccu_div_find_desc(data, 
map->clk_id);
353afa3a8d2ef4a Serge Semin 2020-05-27  280     if (IS_ERR(div)) {
353afa3a8d2ef4a Serge Semin 2020-05-27  281             pr_err("Invalid clock 
ID %d in mapping\n", map->clk_id);
353afa3a8d2ef4a Serge Semin 2020-05-27 @282             return PTR_ERR(div);
353afa3a8d2ef4a Serge Semin 2020-05-27  283     }
353afa3a8d2ef4a Serge Semin 2020-05-27  284  
353afa3a8d2ef4a Serge Semin 2020-05-27  285     ret = ccu_div_reset_domain(div);
353afa3a8d2ef4a Serge Semin 2020-05-27  286     if (ret) {
353afa3a8d2ef4a Serge Semin 2020-05-27  287             pr_err("Reset isn't 
supported by divider %s\n",
353afa3a8d2ef4a Serge Semin 2020-05-27  288                     
clk_hw_get_name(ccu_div_get_clk_hw(div)));
353afa3a8d2ef4a Serge Semin 2020-05-27  289     }
353afa3a8d2ef4a Serge Semin 2020-05-27  290  
353afa3a8d2ef4a Serge Semin 2020-05-27  291     return ret;
353afa3a8d2ef4a Serge Semin 2020-05-27  292  }
353afa3a8d2ef4a Serge Semin 2020-05-27  293  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to