drivers/platform/surface/surface_dtx.c:530:24: sparse: sparse: incorrect type in return expression (different base types)

From: kernel test robot
Date: Thu May 13 2021 - 08:46:59 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c06a2ba62fc401b7aaefd23f5d0bc06d2457ccc1
commit: 1d609992832e900378b305f9f8dcf0ce8473049e platform/surface: Add DTX driver
date: 8 weeks ago
config: i386-randconfig-s032-20210513 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1d609992832e900378b305f9f8dcf0ce8473049e
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 1d609992832e900378b305f9f8dcf0ce8473049e
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=i386

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


iwyu warnings: (new ones prefixed by >>)


vim +530 drivers/platform/surface/surface_dtx.c

523
524 static __poll_t surface_dtx_poll(struct file *file, struct poll_table_struct *pt)
525 {
526 struct sdtx_client *client = file->private_data;
527 __poll_t events = 0;
528
529 if (down_read_killable(&client->ddev->lock))
> 530 return -ERESTARTSYS;
531
532 if (test_bit(SDTX_DEVICE_SHUTDOWN_BIT, &client->ddev->flags)) {
533 up_read(&client->ddev->lock);
534 return EPOLLHUP | EPOLLERR;
535 }
536
537 poll_wait(file, &client->ddev->waitq, pt);
538
539 if (!kfifo_is_empty(&client->buffer))
540 events |= EPOLLIN | EPOLLRDNORM;
541
542 up_read(&client->ddev->lock);
543 return events;
544 }
545

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip