@@ -406,15 +406,15 @@ static int ttusb_dec_get_stb_state (struct ttusb_dec *dec, unsigned int *mode,
return result;
if (c_length >= 0x0c) {
- if (mode != NULL) {
+ if (mode) {
memcpy(&tmp, c, 4);
*mode = ntohl(tmp);
}
- if (model != NULL) {
+ if (model) {
memcpy(&tmp, &c[4], 4);
*model = ntohl(tmp);
}
- if (version != NULL) {
+ if (version) {
memcpy(&tmp, &c[8], 4);
*version = ntohl(tmp);
}
@@ -1393,7 +1393,7 @@ static int ttusb_dec_boot_dsp(struct ttusb_dec *dec)
j = 0;
b = kmalloc(ARM_PACKET_SIZE, GFP_KERNEL);
- if (b == NULL) {
+ if (!b) {
release_firmware(fw_entry);
return -ENOMEM;
}
@@ -1703,18 +1703,17 @@ static int ttusb_dec_probe(struct usb_interface *intf,
break;
}
- if (dec->fe == NULL) {
+ if (!dec->fe)
printk("dvb-ttusb-dec: A frontend driver was not found for device [%04x:%04x]\n",
le16_to_cpu(dec->udev->descriptor.idVendor),
le16_to_cpu(dec->udev->descriptor.idProduct));
- } else {
+ else
if (dvb_register_frontend(&dec->adapter, dec->fe)) {
printk("budget-ci: Frontend registration failed!\n");
if (dec->fe->ops.release)
dec->fe->ops.release(dec->fe);
dec->fe = NULL;
}
- }
ttusb_dec_init_v_pes(dec);
ttusb_dec_init_filters(dec);