[media] siano: fix the debug message
authorMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 7 Mar 2013 10:32:47 +0000 (07:32 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 21 Mar 2013 10:41:42 +0000 (07:41 -0300)
Instead of displaying this:
[   61.869415] smscore_load_firmware_family2: rc=0, postload=0x          (null)
Display, instead:
[ 1348.441160] smscore_load_firmware_family2: rc=0

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/common/siano/smscoreapi.c

index 5034153ed09c0b53390a83e95e9b7f19618658a2..7302f950c6bdfd766814602969258613a81845e4 100644 (file)
@@ -977,13 +977,16 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev,
        msleep(400);
 
 exit_fw_download:
-       sms_debug("rc=%d, postload=0x%p ", rc, coredev->postload_handler);
-
        kfree(msg);
 
-       return ((rc >= 0) && coredev->postload_handler) ?
-               coredev->postload_handler(coredev->context) :
-               rc;
+       if (coredev->postload_handler) {
+               sms_debug("rc=%d, postload=0x%p", rc, coredev->postload_handler);
+               if (rc >= 0)
+                       return coredev->postload_handler(coredev->context);
+       }
+
+       sms_debug("rc=%d", rc);
+       return rc;
 }