{
if (hw_dev == dev->hw_dev)
return 0;
- if (dev->hw_dev != NULL)
+ if (dev->hw_dev)
return -EEXIST;
dev->hw_dev = get_device(hw_dev);
return 0;
}
module_put(driv->module);
}
- if (driv == NULL) {
+ if (!driv) {
/* recognize has failed if we get here */
/* report valid board names before returning error */
for (driv = comedi_drivers; driv; driv = driv->next) {
ret = -EIO;
goto out;
}
- if (driv->attach == NULL) {
+ if (!driv->attach) {
/* driver does not support manual configuration */
dev_warn(dev->class_dev,
"driver '%s' does not support attach using comedi_config\n",
void comedi_auto_unconfig(struct device *hardware_device)
{
- if (hardware_device == NULL)
+ if (!hardware_device)
return;
comedi_release_hardware_device(hardware_device);
}