mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-31 16:57:10 +00:00
physio: avoid uninitialized variables
This commit is contained in:
parent
e9b1074bc7
commit
cd6ba3f086
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=333842
@ -51,6 +51,8 @@ physio(struct cdev *dev, struct uio *uio, int ioflag)
|
||||
vm_prot_t prot;
|
||||
|
||||
csw = dev->si_devsw;
|
||||
npages = 0;
|
||||
sa = NULL;
|
||||
/* check if character device is being destroyed */
|
||||
if (csw == NULL)
|
||||
return (ENXIO);
|
||||
@ -177,7 +179,7 @@ physio(struct cdev *dev, struct uio *uio, int ioflag)
|
||||
error = EFAULT;
|
||||
goto doerror;
|
||||
}
|
||||
if (pbuf) {
|
||||
if (pbuf && sa) {
|
||||
pmap_qenter((vm_offset_t)sa,
|
||||
pages, npages);
|
||||
bp->bio_data = sa + poff;
|
||||
|
Loading…
Reference in New Issue
Block a user