gdrom: fix mistake in assignment of error
authorJens Axboe <axboe@kernel.dk>
Thu, 25 Oct 2018 14:15:30 +0000 (08:15 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 25 Oct 2018 17:17:40 +0000 (11:17 -0600)
Apparently the kbuild bots missed this one originally, but at least
it caught it now. Fix compilation error:

All errors (new ones prefixed by >>):

   drivers/cdrom/gdrom.c: In function 'probe_gdrom':
>> drivers/cdrom/gdrom.c:797:3: error: 'rc' undeclared (first use in this function)
      rc = PTR_ERR(gd.gdrom_rq);
      ^~
   drivers/cdrom/gdrom.c:797:3: note: each undeclared identifier is reported only once for each function it appears in

Fixes: ad5fc6bb7221 ("gdrom: convert to blk-mq")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/cdrom/gdrom.c

index b45c543c571acf10bf87991e45cb50ad850186da..a5b8afe3609c10e3dc0394f07cea53c0e17e70a9 100644 (file)
@@ -794,7 +794,7 @@ static int probe_gdrom(struct platform_device *devptr)
        gd.gdrom_rq = blk_mq_init_sq_queue(&gd.tag_set, &gdrom_mq_ops, 1,
                                BLK_MQ_F_SHOULD_MERGE | BLK_MQ_F_BLOCKING);
        if (IS_ERR(gd.gdrom_rq)) {
-               rc = PTR_ERR(gd.gdrom_rq);
+               err = PTR_ERR(gd.gdrom_rq);
                gd.gdrom_rq = NULL;
                goto probe_fail_requestq;
        }