]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
pktcdvd: fix defective misuses of pkt_<level>
authorJoe Perches <joe@perches.com>
Wed, 11 Sep 2013 21:25:59 +0000 (14:25 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Sep 2013 22:59:34 +0000 (15:59 -0700)
Fix thinkos where pkt_<level> needs a valid pktcdvd_device * and the
pointer is known to be NULL.

Signed-off-by: Joe Perches <joe@perches.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> (go smatch!)
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/block/pktcdvd.c

index 29a5194ab147c5dc91383b46b56784066ace78a6..56188475cfd3e23f9fece3039deee7f721b8a2cf 100644 (file)
@@ -2360,8 +2360,8 @@ static void pkt_make_request(struct request_queue *q, struct bio *bio)
 
        pd = q->queuedata;
        if (!pd) {
-               pkt_err(pd, "%s incorrect request queue\n",
-                       bdevname(bio->bi_bdev, b));
+               pr_err("%s incorrect request queue\n",
+                      bdevname(bio->bi_bdev, b));
                goto end_io;
        }
 
@@ -2841,7 +2841,7 @@ static int pkt_remove_dev(dev_t pkt_dev)
                        break;
        }
        if (idx == MAX_WRITERS) {
-               pkt_dbg(1, pd, "dev not setup\n");
+               pr_debug("dev not setup\n");
                ret = -ENXIO;
                goto out;
        }