checkpatch pointed information out like the following.
Comparison to NULL could be written ...
Thus fix the affected source code places.
Link: http://lkml.kernel.org/r/739f9f1c-3ebe-c21b-c5e2-31976cfbc0ee@users.sourceforge.net
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
int rc = -ENOSYS;
struct resource *res;
int rc = -ENOSYS;
struct resource *res;
- if (mport->ops->open_inb_mbox == NULL)
+ if (!mport->ops->open_inb_mbox)
goto out;
res = kzalloc(sizeof(struct resource), GFP_KERNEL);
goto out;
res = kzalloc(sizeof(struct resource), GFP_KERNEL);
int rc = -ENOSYS;
struct resource *res;
int rc = -ENOSYS;
struct resource *res;
- if (mport->ops->open_outb_mbox == NULL)
+ if (!mport->ops->open_outb_mbox)
goto out;
res = kzalloc(sizeof(struct resource), GFP_KERNEL);
goto out;
res = kzalloc(sizeof(struct resource), GFP_KERNEL);
int rc = 0;
spin_lock(&rio_global_list_lock);
int rc = 0;
spin_lock(&rio_global_list_lock);
- if (rdev->pwcback != NULL)
rc = -ENOMEM;
else
rdev->pwcback = pwcback;
rc = -ENOMEM;
else
rdev->pwcback = pwcback;
goto err_out;
p_port = prev->rswitch->route_table[rdev->destid];
goto err_out;
p_port = prev->rswitch->route_table[rdev->destid];
RIO_MNT_REQ_CMD_IS);
/* Exit if the response is not expected */
RIO_MNT_REQ_CMD_IS);
/* Exit if the response is not expected */
return 0;
checkcount = 3;
return 0;
checkcount = 3;
spin_lock(&rdev->rswitch->lock);
spin_lock(&rdev->rswitch->lock);
- if (ops == NULL || ops->add_entry == NULL) {
+ if (!ops || !ops->add_entry) {
rc = rio_std_route_add_entry(rdev->net->hport, rdev->destid,
rdev->hopcount, table,
route_destid, route_port);
rc = rio_std_route_add_entry(rdev->net->hport, rdev->destid,
rdev->hopcount, table,
route_destid, route_port);
spin_lock(&rdev->rswitch->lock);
spin_lock(&rdev->rswitch->lock);
- if (ops == NULL || ops->get_entry == NULL) {
+ if (!ops || !ops->get_entry) {
rc = rio_std_route_get_entry(rdev->net->hport, rdev->destid,
rdev->hopcount, table,
route_destid, route_port);
rc = rio_std_route_get_entry(rdev->net->hport, rdev->destid,
rdev->hopcount, table,
route_destid, route_port);
spin_lock(&rdev->rswitch->lock);
spin_lock(&rdev->rswitch->lock);
- if (ops == NULL || ops->clr_table == NULL) {
+ if (!ops || !ops->clr_table) {
rc = rio_std_route_clr_table(rdev->net->hport, rdev->destid,
rdev->hopcount, table);
} else if (try_module_get(ops->owner)) {
rc = rio_std_route_clr_table(rdev->net->hport, rdev->destid,
rdev->hopcount, table);
} else if (try_module_get(ops->owner)) {
{
struct rio_dma_ext rio_ext;
{
struct rio_dma_ext rio_ext;
- if (dchan->device->device_prep_slave_sg == NULL) {
+ if (!dchan->device->device_prep_slave_sg) {
pr_err("%s: prep_rio_sg == NULL\n", __func__);
return NULL;
}
pr_err("%s: prep_rio_sg == NULL\n", __func__);
return NULL;
}