file->f_op is never NULL...
[linux-block.git] / drivers / mtd / nand / nandsim.c
index bdc1d15369f844bfce700a9794b4f8eb558fa921..d1c7de92cfdf0c4eeaeed8cd9532c020e534889e 100644 (file)
@@ -575,7 +575,7 @@ static int alloc_device(struct nandsim *ns)
                cfile = filp_open(cache_file, O_CREAT | O_RDWR | O_LARGEFILE, 0600);
                if (IS_ERR(cfile))
                        return PTR_ERR(cfile);
-               if (!cfile->f_op || (!cfile->f_op->read && !cfile->f_op->aio_read)) {
+               if (!cfile->f_op->read && !cfile->f_op->aio_read) {
                        NS_ERR("alloc_device: cache file not readable\n");
                        err = -EINVAL;
                        goto err_close;