Merge branch 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[pandora-kernel.git] / drivers / message / fusion / mptctl.c
index e8deb8e..6e6e16a 100644 (file)
@@ -985,7 +985,7 @@ retry_wait:
        ReplyMsg = (pFWDownloadReply_t)iocp->ioctl_cmds.reply;
        iocstat = le16_to_cpu(ReplyMsg->IOCStatus) & MPI_IOCSTATUS_MASK;
        if (iocstat == MPI_IOCSTATUS_SUCCESS) {
-               printk(MYIOC_s_INFO_FMT "F/W update successfull!\n", iocp->name);
+               printk(MYIOC_s_INFO_FMT "F/W update successful!\n", iocp->name);
                return 0;
        } else if (iocstat == MPI_IOCSTATUS_INVALID_FUNCTION) {
                printk(MYIOC_s_WARN_FMT "Hmmm...  F/W download not supported!?!\n",
@@ -1314,8 +1314,10 @@ mptctl_getiocinfo (unsigned long arg, unsigned int data_size)
        else
                karg->adapterType = MPT_IOCTL_INTERFACE_SCSI;
 
-       if (karg->hdr.port > 1)
+       if (karg->hdr.port > 1) {
+               kfree(karg);
                return -EINVAL;
+       }
        port = karg->hdr.port;
 
        karg->port = port;
@@ -2405,7 +2407,7 @@ done_free_mem:
        }
 
        /* mf is null if command issued successfully
-        * otherwise, failure occured after mf acquired.
+        * otherwise, failure occurred after mf acquired.
         */
        if (mf)
                mpt_free_msg_frame(ioc, mf);