unsigned int itwas, isnow;
bool resubmit;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -EFAULT;
}
- if (NULL == peasycap->pusb_device) {
+ if (!peasycap->pusb_device) {
SAM("ERROR: peasycap->pusb_device is NULL\n");
return -EFAULT;
}
u32 uc;
bool resubmit;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -EFAULT;
}
return -EBUSY;
}
p = peasycap->pusb_device;
- if (NULL == p) {
+ if (!p) {
SAM("ERROR: peaycap->pusb_device is NULL\n");
return -EFAULT;
}
return peasycap->format_offset;
}
}
- if (NULL == peasycap_best_format) {
+ if (!peasycap_best_format) {
SAM("MISTAKE: peasycap_best_format is NULL");
return -EINVAL;
}
unsigned int mood;
int i1, k;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -EFAULT;
}
- if (NULL == peasycap->pusb_device) {
+ if (!peasycap->pusb_device) {
SAM("ERROR: peasycap->pusb_device is NULL\n");
return -EFAULT;
}
unsigned int mood;
int i1, k;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -EFAULT;
}
- if (NULL == peasycap->pusb_device) {
+ if (!peasycap->pusb_device) {
SAM("ERROR: peasycap->pusb_device is NULL\n");
return -EFAULT;
}
unsigned int mood;
int i1, k;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -EFAULT;
}
- if (NULL == peasycap->pusb_device) {
+ if (!peasycap->pusb_device) {
SAM("ERROR: peasycap->pusb_device is NULL\n");
return -EFAULT;
}
unsigned int mood;
int i1, i2, k;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -EFAULT;
}
- if (NULL == peasycap->pusb_device) {
+ if (!peasycap->pusb_device) {
SAM("ERROR: peasycap->pusb_device is NULL\n");
return -EFAULT;
}
s8 mood;
int i1;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -EFAULT;
}
- if (NULL == peasycap->pusb_device) {
+ if (!peasycap->pusb_device) {
SAM("ERROR: peasycap->pusb_device is NULL\n");
return -EFAULT;
}
{
int i1;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -EFAULT;
}
- if (NULL == peasycap->pusb_device) {
+ if (!peasycap->pusb_device) {
SAM("ERROR: peasycap->pusb_device is NULL\n");
return -EFAULT;
}
struct usb_device *p;
int kd;
- if (NULL == file) {
+ if (!file) {
SAY("ERROR: file is NULL\n");
return -ERESTARTSYS;
}
peasycap = file->private_data;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -1;
}
return -EFAULT;
}
p = peasycap->pusb_device;
- if (NULL == p) {
+ if (!p) {
SAM("ERROR: peasycap->pusb_device is NULL\n");
return -EFAULT;
}
/*---------------------------------------------------------------------------*/
if (kd != isdongle(peasycap))
return -ERESTARTSYS;
- if (NULL == file) {
+ if (!file) {
SAY("ERROR: file is NULL\n");
mutex_unlock(&easycapdc60_dongle[kd].mutex_video);
return -ERESTARTSYS;
}
peasycap = file->private_data;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
mutex_unlock(&easycapdc60_dongle[kd].mutex_video);
return -ERESTARTSYS;
return -EFAULT;
}
p = peasycap->pusb_device;
- if (NULL == peasycap->pusb_device) {
+ if (!peasycap->pusb_device) {
SAM("ERROR: peasycap->pusb_device is NULL\n");
mutex_unlock(&easycapdc60_dongle[kd].mutex_video);
return -ERESTARTSYS;
peasycap->isequence = 0;
for (i = 0; i < 180; i++)
peasycap->merit[i] = 0;
- if (NULL == peasycap->pusb_device) {
+ if (!peasycap->pusb_device) {
SAM("ERROR: peasycap->pusb_device is NULL\n");
mutex_unlock(&easycapdc60_dongle[kd].mutex_video);
return -EFAULT;
case VIDIOC_STREAMOFF: {
JOM(8, "VIDIOC_STREAMOFF\n");
- if (NULL == peasycap->pusb_device) {
+ if (!peasycap->pusb_device) {
SAM("ERROR: peasycap->pusb_device is NULL\n");
mutex_unlock(&easycapdc60_dongle[kd].mutex_video);
return -EFAULT;
wake_up_interruptible(&(peasycap->wq_audio));
#else
- if (NULL != peasycap->psubstream)
+ if (peasycap->psubstream)
snd_pcm_period_elapsed(peasycap->psubstream);
#endif /* CONFIG_EASYCAP_OSS */
/*---------------------------------------------------------------------------*/
int isdongle(struct easycap *peasycap)
{
int k;
- if (NULL == peasycap)
+ if (!peasycap)
return -2;
for (k = 0; k < DONGLE_MANY; k++) {
if (easycapdc60_dongle[k].peasycap == peasycap) {
/*---------------------------------------------------------------------------*/
#ifndef EASYCAP_IS_VIDEODEV_CLIENT
- if (NULL == inode) {
+ if (!inode) {
SAY("ERROR: inode is NULL.\n");
return -EFAULT;
}
/*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
#else
pvideo_device = video_devdata(file);
- if (NULL == pvideo_device) {
+ if (!pvideo_device) {
SAY("ERROR: pvideo_device is NULL.\n");
return -EFAULT;
}
peasycap = (struct easycap *)video_get_drvdata(pvideo_device);
#endif /*EASYCAP_IS_VIDEODEV_CLIENT*/
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -EFAULT;
}
SAY("ERROR: bad peasycap: %p\n", peasycap);
return -EFAULT;
}
- if (NULL == peasycap->pusb_device) {
+ if (!peasycap->pusb_device) {
SAM("ERROR: peasycap->pusb_device is NULL\n");
return -EFAULT;
} else {
bool ntsc, other;
int fmtidx;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -EFAULT;
}
int inputnow, video_idlenow, audio_idlenow;
bool resubmit;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -EFAULT;
}
resubmit = false;
}
/*---------------------------------------------------------------------------*/
- if (NULL == peasycap->pusb_device) {
+ if (!peasycap->pusb_device) {
SAM("ERROR: peasycap->pusb_device is NULL\n");
return -ENODEV;
}
return -ENOENT;
}
/*---------------------------------------------------------------------------*/
- if (NULL == peasycap->pusb_device) {
+ if (!peasycap->pusb_device) {
SAM("ERROR: peasycap->pusb_device is NULL\n");
return -ENODEV;
}
int j, isbad, nospc, m, rc;
int isbuf;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -EFAULT;
}
- if (NULL == peasycap->purb_video_head) {
+ if (!peasycap->purb_video_head) {
SAY("ERROR: peasycap->urb_video_head uninitialized\n");
return -EFAULT;
}
- if (NULL == peasycap->pusb_device) {
+ if (!peasycap->pusb_device) {
SAY("ERROR: peasycap->pusb_device is NULL\n");
return -ENODEV;
}
list_for_each(plist_head, (peasycap->purb_video_head)) {
pdata_urb = list_entry(plist_head,
struct data_urb, list_head);
- if (NULL != pdata_urb) {
+ if (pdata_urb) {
purb = pdata_urb->purb;
- if (NULL != purb)
+ if (purb)
usb_kill_urb(purb);
}
}
struct list_head *plist_head;
struct data_urb *pdata_urb;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -EFAULT;
}
peasycap = file->private_data;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL.\n");
SAY("ending unsuccessfully\n");
return -EFAULT;
struct easycap *peasycap;
peasycap = video_get_drvdata(pvideo_device);
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
SAY("ending unsuccessfully\n");
return -EFAULT;
int registered_video, registered_audio;
peasycap = container_of(pkref, struct easycap, kref);
- if (NULL == peasycap) {
+ if (!peasycap) {
SAM("ERROR: peasycap is NULL: cannot perform deletions\n");
return;
}
* FREE VIDEO.
*/
/*---------------------------------------------------------------------------*/
- if (NULL != peasycap->purb_video_head) {
+ if (peasycap->purb_video_head) {
JOM(4, "freeing video urbs\n");
m = 0;
list_for_each(plist_head, (peasycap->purb_video_head)) {
pdata_urb = list_entry(plist_head,
struct data_urb, list_head);
- if (NULL == pdata_urb) {
+ if (!pdata_urb) {
JOM(4, "ERROR: pdata_urb is NULL\n");
} else {
- if (NULL != pdata_urb->purb) {
+ if (pdata_urb->purb) {
usb_free_urb(pdata_urb->purb);
pdata_urb->purb = NULL;
peasycap->allocation_video_urb -= 1;
gone = 0;
for (k = 0; k < FIELD_BUFFER_MANY; k++) {
for (m = 0; m < FIELD_BUFFER_SIZE/PAGE_SIZE; m++) {
- if (NULL != peasycap->field_buffer[k][m].pgo) {
+ if (peasycap->field_buffer[k][m].pgo) {
free_page((unsigned long)
peasycap->field_buffer[k][m].pgo);
peasycap->field_buffer[k][m].pgo = NULL;
gone = 0;
for (k = 0; k < FRAME_BUFFER_MANY; k++) {
for (m = 0; m < FRAME_BUFFER_SIZE/PAGE_SIZE; m++) {
- if (NULL != peasycap->frame_buffer[k][m].pgo) {
+ if (peasycap->frame_buffer[k][m].pgo) {
free_page((unsigned long)
peasycap->frame_buffer[k][m].pgo);
peasycap->frame_buffer[k][m].pgo = NULL;
* FREE AUDIO.
*/
/*---------------------------------------------------------------------------*/
- if (NULL != peasycap->purb_audio_head) {
+ if (peasycap->purb_audio_head) {
JOM(4, "freeing audio urbs\n");
m = 0;
list_for_each(plist_head, (peasycap->purb_audio_head)) {
pdata_urb = list_entry(plist_head,
struct data_urb, list_head);
- if (NULL == pdata_urb)
+ if (!pdata_urb)
JOM(4, "ERROR: pdata_urb is NULL\n");
else {
- if (NULL != pdata_urb->purb) {
+ if (pdata_urb->purb) {
usb_free_urb(pdata_urb->purb);
pdata_urb->purb = NULL;
peasycap->allocation_audio_urb -= 1;
JOM(4, "freeing audio isoc buffers.\n");
m = 0;
for (k = 0; k < AUDIO_ISOC_BUFFER_MANY; k++) {
- if (NULL != peasycap->audio_isoc_buffer[k].pgo) {
+ if (peasycap->audio_isoc_buffer[k].pgo) {
free_pages((unsigned long)
(peasycap->audio_isoc_buffer[k].pgo),
AUDIO_ISOC_ORDER);
JOM(4, "freeing audio buffers.\n");
gone = 0;
for (k = 0; k < peasycap->audio_buffer_page_many; k++) {
- if (NULL != peasycap->audio_buffer[k].pgo) {
+ if (peasycap->audio_buffer[k].pgo) {
free_page((unsigned long)peasycap->audio_buffer[k].pgo);
peasycap->audio_buffer[k].pgo = NULL;
peasycap->allocation_audio_page -= 1;
if (NULL == ((poll_table *)wait))
JOT(8, "WARNING: poll table pointer is NULL ... continuing\n");
- if (NULL == file) {
+ if (!file) {
SAY("ERROR: file pointer is NULL\n");
return -ERESTARTSYS;
}
peasycap = file->private_data;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -EFAULT;
}
SAY("ERROR: bad peasycap: %p\n", peasycap);
return -EFAULT;
}
- if (NULL == peasycap->pusb_device) {
+ if (!peasycap->pusb_device) {
SAY("ERROR: peasycap->pusb_device is NULL\n");
return -EFAULT;
}
*/
if (kd != isdongle(peasycap))
return -ERESTARTSYS;
- if (NULL == file) {
+ if (!file) {
SAY("ERROR: file is NULL\n");
mutex_unlock(&easycapdc60_dongle[kd].mutex_video);
return -ERESTARTSYS;
}
peasycap = file->private_data;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
mutex_unlock(&easycapdc60_dongle[kd].mutex_video);
return -ERESTARTSYS;
mutex_unlock(&easycapdc60_dongle[kd].mutex_video);
return -ERESTARTSYS;
}
- if (NULL == peasycap->pusb_device) {
+ if (!peasycap->pusb_device) {
SAM("ERROR: peasycap->pusb_device is NULL\n");
mutex_unlock(&easycapdc60_dongle[kd].mutex_video);
return -ERESTARTSYS;
int input, ifield, miss, rc;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -EFAULT;
}
- if (NULL == peasycap->pusb_device) {
+ if (!peasycap->pusb_device) {
SAY("ERROR: peasycap->pusb_device is NULL\n");
return -EFAULT;
}
u8 mask, margin;
bool odd, isuy, decimatepixel, offerfields, badinput;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -EFAULT;
}
JOM(8, "lookup tables are prepared\n");
}
pcache = peasycap->pcache;
- if (NULL == pcache)
+ if (!pcache)
pcache = &peasycap->cache[0];
/*---------------------------------------------------------------------------*/
/*
struct easycap *peasycap;
peasycap = pvma->vm_private_data;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return;
}
struct easycap *peasycap;
peasycap = pvma->vm_private_data;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return;
}
retcode = VM_FAULT_NOPAGE;
- if (NULL == pvma) {
+ if (!pvma) {
SAY("pvma is NULL\n");
return retcode;
}
- if (NULL == pvmf) {
+ if (!pvmf) {
SAY("pvmf is NULL\n");
return retcode;
}
return retcode;
}
peasycap = pvma->vm_private_data;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return retcode;
}
/*---------------------------------------------------------------------------*/
pbuf = peasycap->frame_buffer[k][m].pgo;
- if (NULL == pbuf) {
+ if (!pbuf) {
SAM("ERROR: pbuf is NULL\n");
return retcode;
}
page = virt_to_page(pbuf);
- if (NULL == page) {
+ if (!page) {
SAM("ERROR: page is NULL\n");
return retcode;
}
get_page(page);
/*---------------------------------------------------------------------------*/
- if (NULL == page) {
+ if (!page) {
SAM("ERROR: page is NULL after get_page(page)\n");
} else {
pvmf->page = page;
pvma->vm_ops = &easycap_vm_ops;
pvma->vm_flags |= VM_RESERVED;
- if (NULL != file)
+ if (file)
pvma->vm_private_data = file->private_data;
easycap_vma_open(pvma);
return 0;
int framestatus, framelength, frameactual, frameoffset;
u8 *pu;
- if (NULL == purb) {
+ if (!purb) {
SAY("ERROR: easycap_complete(): purb is NULL\n");
return;
}
peasycap = purb->context;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: easycap_complete(): peasycap is NULL\n");
return;
}
JOT(4, "bNumConfigurations=%i\n", pusb_device->descriptor.bNumConfigurations);
/*---------------------------------------------------------------------------*/
pusb_host_interface = pusb_interface->cur_altsetting;
- if (NULL == pusb_host_interface) {
+ if (!pusb_host_interface) {
SAY("ERROR: pusb_host_interface is NULL\n");
return -EFAULT;
}
pusb_interface_descriptor = &(pusb_host_interface->desc);
- if (NULL == pusb_interface_descriptor) {
+ if (!pusb_interface_descriptor) {
SAY("ERROR: pusb_interface_descriptor is NULL\n");
return -EFAULT;
}
/*---------------------------------------------------------------------------*/
if (0 == bInterfaceNumber) {
peasycap = kzalloc(sizeof(struct easycap), GFP_KERNEL);
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: Could not allocate peasycap\n");
return -ENOMEM;
}
*/
/*---------------------------------------------------------------------------*/
for (ndong = 0; ndong < DONGLE_MANY; ndong++) {
- if ((NULL == easycapdc60_dongle[ndong].peasycap) &&
+ if ((!easycapdc60_dongle[ndong].peasycap) &&
(!mutex_is_locked(&easycapdc60_dongle
[ndong].mutex_video)) &&
(!mutex_is_locked(&easycapdc60_dongle
bInterfaceNumber);
return -ENODEV;
}
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL when probing interface %i\n",
bInterfaceNumber);
return -ENODEV;
/*---------------------------------------------------------------------------*/
if (memcmp(&peasycap->telltale[0], TELLTALE, strlen(TELLTALE))) {
pv4l2_device = usb_get_intfdata(pusb_interface);
- if (NULL == pv4l2_device) {
+ if (!pv4l2_device) {
SAY("ERROR: pv4l2_device is NULL\n");
return -ENODEV;
}
for (i = 0; i < pusb_interface->num_altsetting; i++) {
pusb_host_interface = &(pusb_interface->altsetting[i]);
- if (NULL == pusb_host_interface) {
+ if (!pusb_host_interface) {
SAM("ERROR: pusb_host_interface is NULL\n");
return -EFAULT;
}
pusb_interface_descriptor = &(pusb_host_interface->desc);
- if (NULL == pusb_interface_descriptor) {
+ if (!pusb_interface_descriptor) {
SAM("ERROR: pusb_interface_descriptor is NULL\n");
return -EFAULT;
}
/*---------------------------------------------------------------------------*/
for (j = 0; j < pusb_interface_descriptor->bNumEndpoints; j++) {
pepd = &(pusb_host_interface->endpoint[j].desc);
- if (NULL == pepd) {
+ if (!pepd) {
SAM("ERROR: pepd is NULL.\n");
SAM("...... skipping\n");
continue;
for (k = 0; k < FRAME_BUFFER_MANY; k++) {
for (m = 0; m < FRAME_BUFFER_SIZE/PAGE_SIZE; m++) {
- if (NULL != peasycap->frame_buffer[k][m].pgo)
+ if (peasycap->frame_buffer[k][m].pgo)
SAM("attempting to reallocate frame "
" buffers\n");
else {
pbuf = (void *)__get_free_page(GFP_KERNEL);
- if (NULL == pbuf) {
+ if (!pbuf) {
SAM("ERROR: Could not allocate frame "
"buffer %i page %i\n", k, m);
return -ENOMEM;
for (k = 0; k < FIELD_BUFFER_MANY; k++) {
for (m = 0; m < FIELD_BUFFER_SIZE/PAGE_SIZE; m++) {
- if (NULL != peasycap->field_buffer[k][m].pgo) {
+ if (peasycap->field_buffer[k][m].pgo) {
SAM("ERROR: attempting to reallocate "
"field buffers\n");
} else {
pbuf = (void *) __get_free_page(GFP_KERNEL);
- if (NULL == pbuf) {
+ if (!pbuf) {
SAM("ERROR: Could not allocate field"
" buffer %i page %i\n", k, m);
return -ENOMEM;
for (k = 0; k < VIDEO_ISOC_BUFFER_MANY; k++) {
pbuf = (void *)__get_free_pages(GFP_KERNEL,
VIDEO_ISOC_ORDER);
- if (NULL == pbuf) {
+ if (!pbuf) {
SAM("ERROR: Could not allocate isoc video buffer "
"%i\n", k);
return -ENOMEM;
for (k = 0; k < VIDEO_ISOC_BUFFER_MANY; k++) {
purb = usb_alloc_urb(peasycap->video_isoc_framesperdesc,
GFP_KERNEL);
- if (NULL == purb) {
+ if (!purb) {
SAM("ERROR: usb_alloc_urb returned NULL for buffer "
"%i\n", k);
return -ENOMEM;
peasycap->allocation_video_urb += 1;
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
pdata_urb = kzalloc(sizeof(struct data_urb), GFP_KERNEL);
- if (NULL == pdata_urb) {
+ if (!pdata_urb) {
SAM("ERROR: Could not allocate struct data_urb.\n");
return -ENOMEM;
} else
peasycap->audio_buffer_page_many);
for (k = 0; k < peasycap->audio_buffer_page_many; k++) {
- if (NULL != peasycap->audio_buffer[k].pgo) {
+ if (peasycap->audio_buffer[k].pgo) {
SAM("ERROR: attempting to reallocate audio buffers\n");
} else {
pbuf = (void *) __get_free_page(GFP_KERNEL);
- if (NULL == pbuf) {
+ if (!pbuf) {
SAM("ERROR: Could not allocate audio "
"buffer page %i\n", k);
return -ENOMEM;
for (k = 0; k < AUDIO_ISOC_BUFFER_MANY; k++) {
pbuf = (void *)__get_free_pages(GFP_KERNEL,
AUDIO_ISOC_ORDER);
- if (NULL == pbuf) {
+ if (!pbuf) {
SAM("ERROR: Could not allocate isoc audio buffer "
"%i\n", k);
return -ENOMEM;
for (k = 0; k < AUDIO_ISOC_BUFFER_MANY; k++) {
purb = usb_alloc_urb(peasycap->audio_isoc_framesperdesc,
GFP_KERNEL);
- if (NULL == purb) {
+ if (!purb) {
SAM("ERROR: usb_alloc_urb returned NULL for buffer "
"%i\n", k);
return -ENOMEM;
peasycap->allocation_audio_urb += 1 ;
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
pdata_urb = kzalloc(sizeof(struct data_urb), GFP_KERNEL);
- if (NULL == pdata_urb) {
+ if (!pdata_urb) {
SAM("ERROR: Could not allocate struct data_urb.\n");
return -ENOMEM;
}
JOT(4, "\n");
pusb_host_interface = pusb_interface->cur_altsetting;
- if (NULL == pusb_host_interface) {
+ if (!pusb_host_interface) {
JOT(4, "ERROR: pusb_host_interface is NULL\n");
return;
}
pusb_interface_descriptor = &(pusb_host_interface->desc);
- if (NULL == pusb_interface_descriptor) {
+ if (!pusb_interface_descriptor) {
JOT(4, "ERROR: pusb_interface_descriptor is NULL\n");
return;
}
return;
peasycap = usb_get_intfdata(pusb_interface);
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return;
}
/*---------------------------------------------------------------------------*/
if (memcmp(&peasycap->telltale[0], TELLTALE, strlen(TELLTALE))) {
pv4l2_device = usb_get_intfdata(pusb_interface);
- if (NULL == pv4l2_device) {
+ if (!pv4l2_device) {
SAY("ERROR: pv4l2_device is NULL\n");
return;
}
/*---------------------------------------------------------------------------*/
switch (bInterfaceNumber) {
case 0: {
- if (NULL != peasycap->purb_video_head) {
+ if (peasycap->purb_video_head) {
JOM(4, "killing video urbs\n");
m = 0;
list_for_each(plist_head, peasycap->purb_video_head) {
pdata_urb = list_entry(plist_head,
struct data_urb, list_head);
- if (NULL != pdata_urb) {
- if (NULL != pdata_urb->purb) {
+ if (pdata_urb) {
+ if (pdata_urb->purb) {
usb_kill_urb(pdata_urb->purb);
m++;
}
}
/*---------------------------------------------------------------------------*/
case 2: {
- if (NULL != peasycap->purb_audio_head) {
+ if (peasycap->purb_audio_head) {
JOM(4, "killing audio urbs\n");
m = 0;
list_for_each(plist_head, peasycap->purb_audio_head) {
pdata_urb = list_entry(plist_head,
struct data_urb, list_head);
- if (NULL != pdata_urb) {
- if (NULL != pdata_urb->purb) {
+ if (pdata_urb) {
+ if (pdata_urb->purb) {
usb_kill_urb(pdata_urb->purb);
m++;
}
}
/*---------------------------------------------------------------------------*/
#ifndef EASYCAP_IS_VIDEODEV_CLIENT
- if (NULL == peasycap) {
+ if (!peasycap) {
SAM("ERROR: peasycap has become NULL\n");
} else {
usb_deregister_dev(pusb_interface, &easycap_class);
JOT(16, "\n");
- if (NULL == purb) {
+ if (!purb) {
SAY("ERROR: purb is NULL\n");
return;
}
peasycap = purb->context;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return;
}
}
/*---------------------------------------------------------------------------*/
pss = peasycap->psubstream;
- if (NULL == pss)
+ if (!pss)
goto resubmit;
prt = pss->runtime;
- if (NULL == prt)
+ if (!prt)
goto resubmit;
dma_bytes = (int)prt->dma_bytes;
if (0 == dma_bytes)
struct easycap *peasycap;
JOT(4, "\n");
- if (NULL == pss) {
+ if (!pss) {
SAY("ERROR: pss is NULL\n");
return -EFAULT;
}
psnd_pcm = pss->pcm;
- if (NULL == psnd_pcm) {
+ if (!psnd_pcm) {
SAY("ERROR: psnd_pcm is NULL\n");
return -EFAULT;
}
psnd_card = psnd_pcm->card;
- if (NULL == psnd_card) {
+ if (!psnd_card) {
SAY("ERROR: psnd_card is NULL\n");
return -EFAULT;
}
peasycap = psnd_card->private_data;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -EFAULT;
}
SAM("ERROR: bad peasycap->psnd_card\n");
return -EFAULT;
}
- if (NULL != peasycap->psubstream) {
+ if (peasycap->psubstream) {
SAM("ERROR: bad peasycap->psubstream\n");
return -EFAULT;
}
struct easycap *peasycap;
JOT(4, "\n");
- if (NULL == pss) {
+ if (!pss) {
SAY("ERROR: pss is NULL\n");
return -EFAULT;
}
peasycap = snd_pcm_substream_chip(pss);
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -EFAULT;
}
struct snd_pcm_runtime *prt;
JOT(4, "\n");
- if (NULL == pss) {
+ if (!pss) {
SAY("ERROR: pss is NULL\n");
return -EFAULT;
}
prt = pss->runtime;
- if (NULL == prt) {
+ if (!prt) {
SAY("ERROR: substream.runtime is NULL\n");
return -EFAULT;
}
vfree(prt->dma_area);
}
prt->dma_area = vmalloc(sz);
- if (NULL == prt->dma_area)
+ if (!prt->dma_area)
return -ENOMEM;
prt->dma_bytes = sz;
return 0;
int rc;
JOT(4, "%i\n", (params_buffer_bytes(phw)));
- if (NULL == pss) {
+ if (!pss) {
SAY("ERROR: pss is NULL\n");
return -EFAULT;
}
struct snd_pcm_runtime *prt;
JOT(4, "\n");
- if (NULL == pss) {
+ if (!pss) {
SAY("ERROR: pss is NULL\n");
return -EFAULT;
}
prt = pss->runtime;
- if (NULL == prt) {
+ if (!prt) {
SAY("ERROR: substream.runtime is NULL\n");
return -EFAULT;
}
- if (NULL != prt->dma_area) {
+ if (prt->dma_area) {
JOT(8, "prt->dma_area = %p\n", prt->dma_area);
vfree(prt->dma_area);
prt->dma_area = NULL;
struct snd_pcm_runtime *prt;
JOT(4, "\n");
- if (NULL == pss) {
+ if (!pss) {
SAY("ERROR: pss is NULL\n");
return -EFAULT;
}
prt = pss->runtime;
peasycap = snd_pcm_substream_chip(pss);
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -EFAULT;
}
JOT(4, "%i=cmd cf %i=START %i=STOP\n", cmd, SNDRV_PCM_TRIGGER_START,
SNDRV_PCM_TRIGGER_STOP);
- if (NULL == pss) {
+ if (!pss) {
SAY("ERROR: pss is NULL\n");
return -EFAULT;
}
peasycap = snd_pcm_substream_chip(pss);
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -EFAULT;
}
snd_pcm_uframes_t offset;
JOT(16, "\n");
- if (NULL == pss) {
+ if (!pss) {
SAY("ERROR: pss is NULL\n");
return -EFAULT;
}
peasycap = snd_pcm_substream_chip(pss);
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -EFAULT;
}
struct snd_card *psnd_card;
struct snd_pcm *psnd_pcm;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -ENODEV;
}
JOM(4, "starting initialization\n");
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL.\n");
return -EFAULT;
}
- if (NULL == peasycap->pusb_device) {
+ if (!peasycap->pusb_device) {
SAM("ERROR: peasycap->pusb_device is NULL\n");
return -ENODEV;
}
rc = audio_setup(peasycap);
JOM(8, "audio_setup() returned %i\n", rc);
- if (NULL == peasycap->pusb_device) {
+ if (!peasycap->pusb_device) {
SAM("ERROR: peasycap->pusb_device has become NULL\n");
return -ENODEV;
}
/*---------------------------------------------------------------------------*/
- if (NULL == peasycap->pusb_device) {
+ if (!peasycap->pusb_device) {
SAM("ERROR: peasycap->pusb_device has become NULL\n");
return -ENODEV;
}
int j, isbad, nospc, m, rc;
int isbuf;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -EFAULT;
}
- if (NULL == peasycap->purb_audio_head) {
+ if (!peasycap->purb_audio_head) {
SAM("ERROR: peasycap->urb_audio_head uninitialized\n");
return -EFAULT;
}
- if (NULL == peasycap->pusb_device) {
+ if (!peasycap->pusb_device) {
SAM("ERROR: peasycap->pusb_device is NULL\n");
return -EFAULT;
}
m = 0;
list_for_each(plist_head, (peasycap->purb_audio_head)) {
pdata_urb = list_entry(plist_head, struct data_urb, list_head);
- if (NULL != pdata_urb) {
+ if (pdata_urb) {
purb = pdata_urb->purb;
- if (NULL != purb) {
+ if (purb) {
isbuf = pdata_urb->isbuf;
purb->interval = 1;
JOM(4, "attempting cleanup instead of submitting\n");
list_for_each(plist_head, (peasycap->purb_audio_head)) {
pdata_urb = list_entry(plist_head, struct data_urb, list_head);
- if (NULL != pdata_urb) {
+ if (pdata_urb) {
purb = pdata_urb->purb;
- if (NULL != purb)
+ if (purb)
usb_kill_urb(purb);
}
}
struct list_head *plist_head;
struct data_urb *pdata_urb;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return -EFAULT;
}
if (peasycap->audio_isoc_streaming) {
- if (NULL != peasycap->purb_audio_head) {
+ if (peasycap->purb_audio_head) {
peasycap->audio_isoc_streaming = 0;
JOM(4, "killing audio urbs\n");
m = 0;
list_for_each(plist_head, (peasycap->purb_audio_head)) {
pdata_urb = list_entry(plist_head, struct data_urb, list_head);
- if (NULL != pdata_urb) {
- if (NULL != pdata_urb->purb) {
+ if (pdata_urb) {
+ if (pdata_urb->purb) {
usb_kill_urb(pdata_urb->purb);
m++;
}
JOT(16, "\n");
- if (NULL == purb) {
+ if (!purb) {
SAY("ERROR: purb is NULL\n");
return;
}
peasycap = purb->context;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
return;
}
subminor = iminor(inode);
pusb_interface = usb_find_interface(&easycap_usb_driver, subminor);
- if (NULL == pusb_interface) {
+ if (!pusb_interface) {
SAY("ERROR: pusb_interface is NULL\n");
SAY("ending unsuccessfully\n");
return -1;
}
peasycap = usb_get_intfdata(pusb_interface);
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
SAY("ending unsuccessfully\n");
return -1;
/*---------------------------------------------------------------------------*/
if (memcmp(&peasycap->telltale[0], TELLTALE, strlen(TELLTALE))) {
pv4l2_device = usb_get_intfdata(pusb_interface);
- if (NULL == pv4l2_device) {
+ if (!pv4l2_device) {
SAY("ERROR: pv4l2_device is NULL\n");
return -EFAULT;
}
JOT(4, "begins\n");
peasycap = file->private_data;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL.\n");
return -EFAULT;
}
JOT(8, "%5zd=kount %5lld=*poff\n", kount, *poff);
- if (NULL == file) {
+ if (!file) {
SAY("ERROR: file is NULL\n");
return -ERESTARTSYS;
}
peasycap = file->private_data;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR in easyoss_read(): peasycap is NULL\n");
return -EFAULT;
}
SAY("ERROR: bad peasycap: %p\n", peasycap);
return -EFAULT;
}
- if (NULL == peasycap->pusb_device) {
+ if (!peasycap->pusb_device) {
SAY("ERROR: peasycap->pusb_device is NULL\n");
return -EFAULT;
}
*/
if (kd != isdongle(peasycap))
return -ERESTARTSYS;
- if (NULL == file) {
+ if (!file) {
SAY("ERROR: file is NULL\n");
mutex_unlock(&easycapdc60_dongle[kd].mutex_audio);
return -ERESTARTSYS;
}
peasycap = file->private_data;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
mutex_unlock(&easycapdc60_dongle[kd].mutex_audio);
return -ERESTARTSYS;
mutex_unlock(&easycapdc60_dongle[kd].mutex_audio);
return -ERESTARTSYS;
}
- if (NULL == peasycap->pusb_device) {
+ if (!peasycap->pusb_device) {
SAM("ERROR: peasycap->pusb_device is NULL\n");
mutex_unlock(&easycapdc60_dongle[kd].mutex_audio);
return -ERESTARTSYS;
return -EFAULT;
}
pdata_buffer = &peasycap->audio_buffer[peasycap->audio_read];
- if (NULL == pdata_buffer) {
+ if (!pdata_buffer) {
SAM("ERROR: pdata_buffer is NULL\n");
mutex_unlock(&easycapdc60_dongle[kd].mutex_audio);
return -EFAULT;
szret = (size_t)0;
fragment = (peasycap->audio_read / peasycap->audio_pages_per_fragment);
while (fragment == (peasycap->audio_read / peasycap->audio_pages_per_fragment)) {
- if (NULL == pdata_buffer->pgo) {
+ if (!pdata_buffer->pgo) {
SAM("ERROR: pdata_buffer->pgo is NULL\n");
mutex_unlock(&easycapdc60_dongle[kd].mutex_audio);
return -EFAULT;
}
- if (NULL == pdata_buffer->pto) {
+ if (!pdata_buffer->pto) {
SAM("ERROR: pdata_buffer->pto is NULL\n");
mutex_unlock(&easycapdc60_dongle[kd].mutex_audio);
return -EFAULT;
return -EFAULT;
}
pdata_buffer = &peasycap->audio_buffer[peasycap->audio_read];
- if (NULL == pdata_buffer) {
+ if (!pdata_buffer) {
SAM("ERROR: pdata_buffer is NULL\n");
mutex_unlock(&easycapdc60_dongle[kd].mutex_audio);
return -EFAULT;
}
- if (NULL == pdata_buffer->pgo) {
+ if (!pdata_buffer->pgo) {
SAM("ERROR: pdata_buffer->pgo is NULL\n");
mutex_unlock(&easycapdc60_dongle[kd].mutex_audio);
return -EFAULT;
}
- if (NULL == pdata_buffer->pto) {
+ if (!pdata_buffer->pto) {
SAM("ERROR: pdata_buffer->pto is NULL\n");
mutex_unlock(&easycapdc60_dongle[kd].mutex_audio);
return -EFAULT;
struct usb_device *p;
int kd;
- if (NULL == file) {
+ if (!file) {
SAY("ERROR: file is NULL\n");
return -ERESTARTSYS;
}
peasycap = file->private_data;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL.\n");
return -EFAULT;
}
return -EFAULT;
}
p = peasycap->pusb_device;
- if (NULL == p) {
+ if (!p) {
SAM("ERROR: peasycap->pusb_device is NULL\n");
return -EFAULT;
}
*/
if (kd != isdongle(peasycap))
return -ERESTARTSYS;
- if (NULL == file) {
+ if (!file) {
SAY("ERROR: file is NULL\n");
mutex_unlock(&easycapdc60_dongle[kd].mutex_audio);
return -ERESTARTSYS;
}
peasycap = file->private_data;
- if (NULL == peasycap) {
+ if (!peasycap) {
SAY("ERROR: peasycap is NULL\n");
mutex_unlock(&easycapdc60_dongle[kd].mutex_audio);
return -ERESTARTSYS;
return -EFAULT;
}
p = peasycap->pusb_device;
- if (NULL == peasycap->pusb_device) {
+ if (!peasycap->pusb_device) {
SAM("ERROR: peasycap->pusb_device is NULL\n");
mutex_unlock(&easycapdc60_dongle[kd].mutex_audio);
return -ERESTARTSYS;