Merge branches 'pm-cpufreq' and 'acpi-cppc'
[firefly-linux-kernel-4.4.55.git] / drivers / mailbox / pcc.c
index 68885a82e7046456d95febb9381721931d2f3b2f..45d85aea9955404d0c4567f33863e0e3f500674f 100644 (file)
@@ -122,7 +122,7 @@ struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *cl,
         */
        chan = get_pcc_channel(subspace_id);
 
-       if (!chan || chan->cl) {
+       if (IS_ERR(chan) || chan->cl) {
                dev_err(dev, "Channel not found for idx: %d\n", subspace_id);
                return ERR_PTR(-EBUSY);
        }