From: Dan Carpenter <dan.carpenter@oracle.com>
To: linux-s390@vger.kernel.org
Subject: [bug report] [S390] z/VM unit record device driver
Date: Wed, 03 Aug 2016 12:40:54 +0000 [thread overview]
Message-ID: <20160803124054.GA8279@mwanda> (raw)
Hello Frank Munzert,
The patch 810cb5b32ded: "[S390] z/VM unit record device driver" from
Jul 17, 2007, leads to the following static checker warning:
drivers/s390/char/vmur.c:320 ur_int_handler()
warn: 'irb' isn't an ERR_PTR
drivers/s390/char/vmur.c
304 static void ur_int_handler(struct ccw_device *cdev, unsigned long intparm,
305 struct irb *irb)
306 {
307 struct urdev *urd;
308
309 TRACE("ur_int_handler: intparm=0x%lx cstat=%02x dstat=%02x res=%u\n",
310 intparm, irb->scsw.cmd.cstat, irb->scsw.cmd.dstat,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
311 irb->scsw.cmd.count);
^^^^^^^^^^^^^^^^^^^
We already dereferenced irb several times.
312
313 if (!intparm) {
314 TRACE("ur_int_handler: unsolicited interrupt\n");
315 return;
316 }
317 urd = dev_get_drvdata(&cdev->dev);
318 BUG_ON(!urd);
319 /* On special conditions irb is an error pointer */
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is possibly true. The static checker is assuming x86_64 rules.
320 if (IS_ERR(irb))
^^^^^^^^^^
321 urd->io_request_rc = PTR_ERR(irb);
322 else if (irb->scsw.cmd.dstat == (DEV_STAT_CHN_END | DEV_STAT_DEV_END))
323 urd->io_request_rc = 0;
324 else
325 urd->io_request_rc = -EIO;
326
327 complete(urd->io_done);
328 }
regards,
dan carpenter
reply other threads:[~2016-08-03 12:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160803124054.GA8279@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-s390@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.