diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-08-28 06:50:28 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-09-23 08:20:57 -0400 |
commit | af28c99628ebfbdc3fff3d92c7044d3a51b7ccea (patch) | |
tree | ff56a13fbd5ed6c2bb20a746464fd49fb0199c48 /drivers/media/dvb-frontends/drxd_hard.c | |
parent | 2d3da59ff163b2aa805de0fc65ba933a735b00cd (diff) | |
download | talos-op-linux-af28c99628ebfbdc3fff3d92c7044d3a51b7ccea.tar.gz talos-op-linux-af28c99628ebfbdc3fff3d92c7044d3a51b7ccea.zip |
media: drivers: Adjust checks for null pointers
The script “checkpatch.pl” pointed information out like the following.
Comparison to NULL could be written !…
Thus fix the affected source code places.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Diffstat (limited to 'drivers/media/dvb-frontends/drxd_hard.c')
-rw-r--r-- | drivers/media/dvb-frontends/drxd_hard.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/dvb-frontends/drxd_hard.c b/drivers/media/dvb-frontends/drxd_hard.c index 47b0d37e70ba..3bdf9b1f4e7c 100644 --- a/drivers/media/dvb-frontends/drxd_hard.c +++ b/drivers/media/dvb-frontends/drxd_hard.c @@ -328,7 +328,7 @@ static int WriteTable(struct drxd_state *state, u8 * pTable) { int status = 0; - if (pTable == NULL) + if (!pTable) return 0; while (!status) { @@ -909,7 +909,7 @@ static int load_firmware(struct drxd_state *state, const char *fw_name) } state->microcode = kmemdup(fw->data, fw->size, GFP_KERNEL); - if (state->microcode == NULL) { + if (!state->microcode) { release_firmware(fw); return -ENOMEM; } @@ -2629,7 +2629,7 @@ static int DRXD_init(struct drxd_state *state, const u8 *fw, u32 fw_size) break; /* Apply I2c address patch to B1 */ - if (!state->type_A && state->m_HiI2cPatch != NULL) { + if (!state->type_A && state->m_HiI2cPatch) { status = WriteTable(state, state->m_HiI2cPatch); if (status < 0) break; |