From: Mauro Carvalho Chehab Date: Thu, 7 Mar 2013 10:32:47 +0000 (-0300) Subject: [media] siano: fix the debug message X-Git-Tag: v3.10-rc1~136^2~455 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=1e19c21ec7b5e66228602f4d88d894e23db1e004;p=~emulex%2Finfiniband.git [media] siano: fix the debug message 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 --- diff --git a/drivers/media/common/siano/smscoreapi.c b/drivers/media/common/siano/smscoreapi.c index 5034153ed09..7302f950c6b 100644 --- a/drivers/media/common/siano/smscoreapi.c +++ b/drivers/media/common/siano/smscoreapi.c @@ -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; }